diff lib/sshv2.c @ 211:3f2203e70218

2003-7-6 Brian Masney <masneyb@gftp.org> * lib/protocols.c lib/sshv2.c src/gtk/dnd.c src/gtk/menu-items.c - instead of using g_strconcat to build the directory paths, use g_build_path. Fixes a bug when you was connected to a remote host, and you was in /, the path would show up as // (from Krzysztof Foltman <kfoltman@onet.pl>, slightly changed by me)
author masneyb
date Sun, 06 Jul 2003 14:14:34 +0000
parents 82ebd1b05345
children de6a2e8e51cb
line wrap: on
line diff
--- a/lib/sshv2.c	Sun Jul 06 13:52:43 2003 +0000
+++ b/lib/sshv2.c	Sun Jul 06 14:14:34 2003 +0000
@@ -1626,7 +1626,8 @@
   else
     {
       oldlen = strlen (request->directory) + strlen (oldname) + 1;
-      oldstr = g_strconcat (request->directory, "/", oldname, NULL);
+      oldstr = g_build_path (G_DIR_SEPARATOR_S, request->directory, oldname, 
+                             NULL);
     }
 
   if (*newname == '/')
@@ -1637,7 +1638,8 @@
   else
     {
       newlen = strlen (request->directory) + strlen (newname) + 1;
-      newstr = g_strconcat (request->directory, "/", newname, NULL);
+      newstr = g_build_path (G_DIR_SEPARATOR_S, request->directory, newname, 
+                             NULL);
     }
 
   tempstr = g_malloc (oldlen + newlen + 13);
@@ -2262,4 +2264,3 @@
 
   return (gftp_set_config_options (request));
 }
-