[gnome-commander] Only add a slash in front of the remote folder if the user did not add one
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Only add a slash in front of the remote folder if the user did not add one
- Date: Tue, 28 Sep 2021 19:01:30 +0000 (UTC)
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]