Index: src/file-manager/fm-icon-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-icon-view.c,v
retrieving revision 1.261
diff -u -r1.261 fm-icon-view.c
--- src/file-manager/fm-icon-view.c	21 May 2002 18:24:19 -0000	1.261
+++ src/file-manager/fm-icon-view.c	31 May 2002 22:15:09 -0000
@@ -2134,6 +2134,22 @@
 	gtk_widget_show (GTK_WIDGET (icon_container));
 }
 
+static gboolean
+uri_is_file_or_local (const char *text_uri)
+{
+	GnomeVFSURI *uri;
+	gboolean ret;
+
+	uri = gnome_vfs_uri_new (text_uri);
+	g_return_val_if_fail (uri != NULL, FALSE);
+	
+	ret = (eel_istr_has_prefix (text_uri, "file:") || gnome_vfs_uri_is_local (uri));
+
+	gnome_vfs_uri_unref (uri);
+	
+	return ret;
+}
+
 static void
 icon_view_handle_uri_list (NautilusIconContainer *container, const char *item_uris,
 			   GdkDragAction action, int x, int y, FMIconView *view)
@@ -2141,7 +2157,6 @@
 
 	GList *uri_list;
 	GList *node, *real_uri_list = NULL;
-	GnomeVFSURI *container_uri;
 	GnomeDesktopItem *entry;
 	GdkPoint point;
 	char *uri;
@@ -2158,14 +2173,11 @@
 	}
 
 	container_uri_string = fm_directory_view_get_uri (FM_DIRECTORY_VIEW (view));
-	container_uri = gnome_vfs_uri_new (container_uri_string);
-	g_return_if_fail (container_uri != NULL);
 
-	if (!gnome_vfs_uri_is_local (container_uri)) {
+	if (!uri_is_file_or_local (container_uri_string)) {
 		eel_show_warning_dialog (_("Drag and drop is only supported to local file systems."),
 					 _("Drag and Drop error"),
 					 fm_directory_view_get_containing_window (FM_DIRECTORY_VIEW (view)));
-		gnome_vfs_uri_unref (container_uri);
 		g_free (container_uri_string);
 		return;
 	}
@@ -2184,7 +2196,6 @@
 		eel_show_warning_dialog (_("An invalid drag type was used."),
 					 _("Drag and Drop error"),
 					 fm_directory_view_get_containing_window (FM_DIRECTORY_VIEW (view)));
-		gnome_vfs_uri_unref (container_uri);
 		g_free (container_uri_string);
 		return;
 	}
@@ -2207,8 +2218,11 @@
 		if (sanitized_uri == NULL)
 			continue;
 		real_uri_list = g_list_append (real_uri_list, sanitized_uri);
-		if (strncmp (sanitized_uri, "file", 4) != 0)
+		
+		if (!uri_is_file_or_local (sanitized_uri)) {
 			all_local = FALSE;
+		}
+		
 		n_uris++;
 	}
 	nautilus_icon_dnd_uri_list_free_strings (uri_list);
@@ -2279,7 +2293,6 @@
 	
 	nautilus_icon_dnd_uri_list_free_strings (real_uri_list);
 
-	gnome_vfs_uri_unref (container_uri);
 	g_free (container_uri_string);
 	
 }
