Fix review comments + also check against trailing bakslash.
authoralex-z <blackslayer4@gmail.com>
Sat, 25 Sep 2021 08:59:12 +0000 (11:59 +0300)
committerMatthieu Gallien (Rebase PR Action) <matthieu_gallien@yahoo.fr>
Mon, 27 Sep 2021 08:13:29 +0000 (08:13 +0000)
Signed-off-by: alex-z <blackslayer4@gmail.com>
src/cmd/cmd.cpp

index 38e8d7091ffa2c329060a07d06690b3b0f34547a..b706a382bcec2647de7fbdf791d1941e76bceafd 100644 (file)
@@ -350,7 +350,7 @@ int main(int argc, char **argv)
         return EXIT_FAILURE;
     }
 
-    QUrl hostUrl = QUrl::fromUserInput(options.target_url.endsWith('/') ? options.target_url.chopped(1) : options.target_url);
+    QUrl hostUrl = QUrl::fromUserInput((options.target_url.endsWith(QLatin1Char('/')) || options.target_url.endsWith(QLatin1Char('\\'))) ? options.target_url.chopped(1) : options.target_url);
 
     // Order of retrieval attempt (later attempts override earlier ones):
     // 1. From URL