+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?
+
2006-09-14 Veerapuram Varadhan <vvaradhan@novell.com>
** Fixes bug #350907
CamelStreamVFS *stream_vfs = CAMEL_STREAM_VFS (object);
if (stream_vfs->handle != -1)
- close (stream_vfs->handle);
+ gnome_vfs_close (stream_vfs->handle);
}
camel_url_new_with_base (CamelURL *base, const char *url_string)
{
CamelURL *url;
+ const char *start;
const char *end, *hash, *colon, *semi, *at, *slash, *question;
const char *p;
url = g_new0 (CamelURL, 1);
+ start = url_string;
/* See RFC1808 for details. IF YOU CHANGE ANYTHING IN THIS
* FUNCTION, RUN tests/misc/url AFTERWARDS.
if (!*url_string && !base)
return url;
+#ifdef G_OS_WIN32
+ if (url->protocol && !strcmp(url->protocol, "file")) {
+ url->path = g_filename_from_uri(start, &url->host, NULL);
+ return url;
+ }
+#endif
+
/* Check for authority */
if (strncmp (url_string, "//", 2) == 0) {
url_string += 2;
* tests/misc/url AFTERWARD.
*/
+#ifdef G_OS_WIN32
+ if (url->protocol && !strcmp(url->protocol, "file"))
+ return g_filename_to_uri(url->path, url->host, NULL);
+#endif G_OS_WIN32
+
str = g_string_sized_new (20);
if (url->protocol)