GNOME Bugzilla – Bug 358010
camel: Fix Win32 bugs when using attachments
Last modified: 2013-09-10 13:42:18 UTC
Please describe the problem: I'm using evolution 2.8 / eds 1.8 on Win32 1. You can not add attachments to a mail. 2. If you try to open an attachment by double-clicking on it, nothing happens. 3. If you save an attachment, the file isn't closed correctly, that means you can't delete it, until evolution is closed. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 73507 [details] [review] win32-patch The patch uses g_filename_to_uri()/g_filename_from_uri() becuase win32 uris are a bit special (i.e. file:///c:/test.txt is valid and the path would be c:/test.txt) And it uses gnome_vfs_close() instead of close() to close streams.
tml: ping - patch attached
Looks fine to me. Calling close() on a GnomeVFSHandle* is a pretty serious bug, heh, great catch. (The compiler surely must warn about it, but nobody has noticed/cared?) (Couldn't g_filename_to/from_uri() be used on all platforms here, even, or do we want to avoid the risk of doing so breaking something on Unix?) Anyway, Andre, feel free to commit this.
Created attachment 73640 [details] [review] patch2 There was a memleak in the old patch, so here is a new one.
Please commit.
Committed: 2006-10-05 Tor Lillqvist <tml@novell.com> Fixes from Steffen Eschenbacher: * camel-stream-vfs.c (camel_stream_vfs_finalize): Call gnome_vfs_close() on the GnomeVFSHandle *, not close(). (#350576, #350885, #358010) * camel-url.c (camel_url_new_with_base, camel_url_to_string): On Win32, for file: urls, simply call g_filename_{to/from}_uri. (#358010) We could do this on all platforms maybe?
*** Bug 375888 has been marked as a duplicate of this bug. ***