GNOME Bugzilla – Bug 439841
2.2.8: file stream's seek and reset broken
Last modified: 2007-05-21 13:26:58 UTC
GMimeFileStream's seek uses SEEK_END for a value calculated for SEEK_SET. This is causing problems right now in Pan. GMimeFileStream's reset calls fseek to reset, but doesn't update the stream's position variable. As an aside, GMimeStreamCat likewise doesn't update its position variable in its reset function, but I'm not positive that it's a bug there and just wanted to bring it to your attention.
Created attachment 88469 [details] [review] fixes problems in file stream -- doesn't touch cat stream
*** Bug 426377 has been marked as a duplicate of this bug. ***
I recently changed reset semantics such that returning 0 from the implementation will set the stream->position = stream->bound_start in gmime-stream.c however, good catch on the SEEK_END bit, that is definitely broken :)