--- gvfs-1.6.0/daemon/gvfsbackendftp.c	2010-02-22 10:57:39.000000000 +0100
+++ gvfs-1.6.0.new/daemon/gvfsbackendftp.c	2010-03-30 22:35:02.938260576 +0200
@@ -195,29 +195,33 @@
 g_vfs_backend_create_file_from_reply (GVfsBackendFtp *ftp, const char *name)
 {
   const char *end;
-
-  end = name + strlen (name);
+  char *path;
+  int i = 0;
+  GVfsFtpFile *file;
 
   /* strip leading spaces */
   while (g_ascii_isspace (*name))
     name++;
 
-  /* strip leading and trailing quote character */
-  /* FIXME: need to unescape th contained string? */
-  if (*name == '"' && end[-1] == '"')
-    {
+  /* parse reply according to rfc959 */
+  if (*name == '"')
       name++;
-      end--;
-    }
-
-  if (*end == '\0') {
-    return g_vfs_ftp_file_new_from_ftp (ftp, name);
+  path = g_malloc(strlen(name)+1);
+  end = name;
+  while (*end != '\0') {
+      if (*end != '"' || end[1] == '"') {
+		  path[i++] = *end;
+		  if (*end == '"')
+			  end++;
   } else {
-    char *s = g_strndup (name, end - name);
-    GVfsFtpFile *file = g_vfs_ftp_file_new_from_ftp (ftp, s);
-    g_free (s);
-    return file;
+		  break;
   }
+	  end++;
+  }
+  path[i] = '\0';
+  file = g_vfs_ftp_file_new_from_ftp (ftp, path);
+  g_free (path);
+  return file;
 }
 
 static void
