Blob Blame History Raw
Index: lib/rb-file-helpers.c
===================================================================
--- lib/rb-file-helpers.c	(revision 5381)
+++ lib/rb-file-helpers.c	(working copy)
@@ -1070,6 +1070,8 @@
 {
 	char *result = NULL;
 
+	g_return_val_if_fail (uri != NULL, NULL);
+
 	if (uri[0] == '/') {
 		/* local path */
 		char *tmp;
@@ -1081,17 +1083,6 @@
 		tmp = escape_extra_gnome_vfs_chars (tmp);
 		result = g_strconcat ("file://", tmp, NULL);
 		g_free (tmp);
-	} else  if (g_str_has_prefix (uri, "file://")) {
-	    	/* local file, rhythmdb wants this path escaped */
-		char *tmp1, *tmp2;
-		tmp1  = gnome_vfs_unescape_string (uri + 7, NULL);  /* ignore "file://" */
-		tmp2 = gnome_vfs_escape_path_string (tmp1);
-		g_free (tmp1);
-		if (tmp2 == NULL)
-			return NULL;
-		tmp2 = escape_extra_gnome_vfs_chars (tmp2);
-		result = g_strconcat ("file://", tmp2, NULL); /* re-add scheme */
-		g_free (tmp2);
 	} else {
 		GnomeVFSURI *vfsuri = gnome_vfs_uri_new (uri);