[PATCH] Don't call gnome_vfs_new on local path



The attached patch fixes gnome_vfs_find_directory_cancellable to pass a
text URI to gnome_vfs_new instead of a local path.

-- 
Christian Neumair <chris gnome-de org>
Index: libgnomevfs/gnome-vfs-cancellable-ops.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-cancellable-ops.c,v
retrieving revision 1.39
diff -u -p -r1.39 gnome-vfs-cancellable-ops.c
--- libgnomevfs/gnome-vfs-cancellable-ops.c	8 Aug 2006 08:55:03 -0000	1.39
+++ libgnomevfs/gnome-vfs-cancellable-ops.c	25 Sep 2006 20:22:52 -0000
@@ -29,6 +29,7 @@
 #include "gnome-vfs-cancellable-ops.h"
 #include "gnome-vfs-method.h"
 #include "gnome-vfs-private-utils.h"
+#include "gnome-vfs-utils.h"
 #include "gnome-vfs-handle-private.h"
 
 #include <glib/gmessages.h>
@@ -296,8 +297,13 @@ gnome_vfs_find_directory_cancellable (Gn
 	if (near_uri != NULL) {
 		gnome_vfs_uri_ref (near_uri);
 	} else {
+		char *text_uri;
+
+		text_uri = gnome_vfs_get_uri_from_local_path (g_get_home_dir ());
+		g_assert (text_uri != NULL);
 		/* assume file: method and the home directory */
-		near_uri = gnome_vfs_uri_new (g_get_home_dir());
+		near_uri = gnome_vfs_uri_new (text_uri);
+		g_free (text_uri);
 	}
 
 	g_assert (near_uri != NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]