[gnome-commander] Only add a slash in front of the remote folder if the user did not add one



commit 818e50d812ad5095ca0923b2ec680c44ea2fc9bc
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Sep 26 23:20:25 2021 +0200

    Only add a slash in front of the remote folder if the user did not add one

 src/gnome-cmd-con.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/gnome-cmd-con.cc b/src/gnome-cmd-con.cc
index d5a2f60c..25c2575d 100644
--- a/src/gnome-cmd-con.cc
+++ b/src/gnome-cmd-con.cc
@@ -628,7 +628,13 @@ string &__gnome_cmd_con_make_uri (string &s, const gchar *method, gboolean use_a
         s += ':' + port;
 
     if (!folder.empty())
-        s += '/' + folder;
+    {
+        if (folder[0] != '/')
+        {
+            s += '/';
+        }
+        s += folder;
+    }
 
     return s;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]