diff lib/protocols.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 d79e2782eb1b
children 3d6e024dbf31
line wrap: on
line diff
--- a/lib/protocols.c	Sun Jul 06 13:52:43 2003 +0000
+++ b/lib/protocols.c	Sun Jul 06 14:14:34 2003 +0000
@@ -1540,9 +1540,13 @@
         fle->startsize = *newsize;
 
       if (transfer->toreq)
-        fle->destfile = g_strconcat (transfer->toreq->directory, "/", 
-                                     fle->file, NULL);
-      newname = g_strconcat (transfer->fromreq->directory, "/", fle->file, NULL);
+        fle->destfile = g_build_path (G_DIR_SEPARATOR_S, 
+                                      transfer->toreq->directory, fle->file, 
+                                      NULL);
+
+      newname = g_build_path (G_DIR_SEPARATOR_S, transfer->fromreq->directory,
+			     fle->file, NULL);
+
       g_free (fle->file);
       fle->file = newname;
 
@@ -2508,4 +2512,3 @@
 
   return (fd);
 }
-