diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-05 20:16:13 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:34 +0800 |
commit | c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8 (patch) | |
tree | bba5b7220bac55c1f49f23f1deb769ce51b767eb /modules/mail/e-mail-attachment-handler.c | |
parent | d9ee2fc9c62739ea7dca2fbe9159e1cec9d2784d (diff) | |
download | gsoc2013-evolution-c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8.tar gsoc2013-evolution-c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8.tar.gz gsoc2013-evolution-c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8.tar.bz2 gsoc2013-evolution-c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8.tar.lz gsoc2013-evolution-c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8.tar.xz gsoc2013-evolution-c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8.tar.zst gsoc2013-evolution-c72aba8f7c13cdc68b1f3dbc1d381be45e0c4cb8.zip |
Prefer g_seekable_seek() over camel_stream_reset().
When a stream is obviously a file or memory stream (both of which
implement the GSeekable interface), use g_seekable_seek() instead of
camel_stream_reset().
This is helping me discover if it's safe to remove camel_stream_reset().
We want to eventually move to GIO streams, which have no reset method.
Diffstat (limited to 'modules/mail/e-mail-attachment-handler.c')
-rw-r--r-- | modules/mail/e-mail-attachment-handler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c index e65e6871c2..e6493f2f77 100644 --- a/modules/mail/e-mail-attachment-handler.c +++ b/modules/mail/e-mail-attachment-handler.c @@ -221,7 +221,7 @@ mail_attachment_handler_message_rfc822 (EAttachmentView *view, stream = camel_stream_mem_new (); camel_stream_write (stream, data, length, NULL, NULL); - camel_stream_reset (stream, NULL); + g_seekable_seek (G_SEEKABLE (stream), 0, G_SEEK_SET, NULL, NULL); message = camel_mime_message_new (); wrapper = CAMEL_DATA_WRAPPER (message); |