[gvfs] [FTP] do not add double slashes when constructing relative to	root
- From: Benjamin Otte <otte src gnome org>
 
- To: svn-commits-list gnome org
 
- Subject: [gvfs] [FTP] do not add double slashes when constructing relative to	root
 
- Date: Thu, 11 Jun 2009 05:20:07 -0400 (EDT)
 
commit 5e3ce10bd814834731ac70e584a90b64ab2860fe
Author: Benjamin Otte <otte gnome org>
Date:   Thu Jun 4 18:40:53 2009 +0200
    [FTP] do not add double slashes when constructing relative to root
---
 daemon/gvfsftpfile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemon/gvfsftpfile.c b/daemon/gvfsftpfile.c
index 7f0b45e..f72c0fa 100644
--- a/daemon/gvfsftpfile.c
+++ b/daemon/gvfsftpfile.c
@@ -171,7 +171,7 @@ g_vfs_ftp_file_new_child (const GVfsFtpFile *parent, const char *display_name, G
       return NULL;
     }
 
-  new_path = g_strconcat (parent->gvfs_path, "/", display_name, NULL);
+  new_path = g_strconcat (parent->gvfs_path, parent->gvfs_path[1] == 0 ? "" : "/", display_name, NULL);
   child = g_vfs_ftp_file_new_from_gvfs (parent->backend, new_path);
   g_free (new_path);
   return child;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]