? gnome-vfs-modules-escape-volume-names.patch
? daemon/gnome-vfs-daemon
? libgnomevfs/s-enum-types-c
? libgnomevfs/s-enum-types-h
Index: modules/computer-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/computer-method.c,v
retrieving revision 1.5
diff -u -r1.5 computer-method.c
--- modules/computer-method.c	11 Feb 2004 11:38:27 -0000	1.5
+++ modules/computer-method.c	7 Jun 2004 22:54:36 -0000
@@ -221,6 +221,10 @@
 	GList *l;
 	ComputerFile *file;
 
+	if (!name) {
+		return NULL;
+	}
+
 	for (l = dir->files; l != NULL; l = l->next) {
 		file = l->data;
 		if (strcmp (file->file_name, name) == 0) {
@@ -230,6 +234,19 @@
 	return NULL;
 }
 
+static char *
+build_file_name (char *name, char *extension)
+{
+	char *escaped;
+	char *ret;
+	
+	escaped = gnome_vfs_escape_string (name);
+	ret = g_strconcat (escaped, extension, NULL);
+	g_free (escaped);
+	
+	return ret;
+}
+
 static void
 volume_mounted (GnomeVFSVolumeMonitor *volume_monitor,
 		GnomeVFSVolume	       *volume,
@@ -245,7 +262,7 @@
 		if (drive == NULL) {
 			file = computer_file_new (COMPUTER_VOLUME);
 			name = gnome_vfs_volume_get_display_name (volume);
-			file->file_name = g_strconcat (name, ".volume", NULL);
+			file->file_name = build_file_name (name, ".volume");
 			g_free (name);
 			file->volume = gnome_vfs_volume_ref (volume);
 			computer_file_add (dir, file);
@@ -297,7 +314,7 @@
 	if (gnome_vfs_drive_is_user_visible (drive)) {
 		file = computer_file_new (COMPUTER_DRIVE);
 		name = gnome_vfs_drive_get_display_name (drive);
-		file->file_name = g_strconcat (name, ".drive", NULL);
+		file->file_name = build_file_name (name, ".drive");
 		g_free (name);
 		file->drive = gnome_vfs_drive_ref (drive);
 		computer_file_add (dir, file);
@@ -355,7 +372,7 @@
 		if (gnome_vfs_drive_is_user_visible (drive)) {
 			file = computer_file_new (COMPUTER_DRIVE);
 			name = gnome_vfs_drive_get_display_name (drive);
-			file->file_name = g_strconcat (name, ".drive", NULL);
+			file->file_name = build_file_name (name, ".drive");
 			g_free (name);
 			file->drive = gnome_vfs_drive_ref (drive);
 			computer_file_add (dir, file);
@@ -369,7 +386,7 @@
 			if (drive == NULL) {
 				file = computer_file_new (COMPUTER_VOLUME);
 				name = gnome_vfs_volume_get_display_name (volume);
-				file->file_name = g_strconcat (name, ".volume", NULL);
+				file->file_name = build_file_name (name, ".volume");
 				g_free (name);
 				file->volume = gnome_vfs_volume_ref (volume);
 				computer_file_add (dir, file);
@@ -592,6 +609,7 @@
 	G_LOCK (root_dir);
 	
 	name = gnome_vfs_uri_extract_short_name (uri);
+	g_print ("name for %s: %s\n", uri->text, name);
 	file = get_file (dir, name);
 	g_free (name);
 	
