diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp index da092807b..b706a382b 100644 --- a/src/cmd/cmd.cpp +++ b/src/cmd/cmd.cpp @@ -350,7 +350,7 @@ int main(int argc, char **argv) return EXIT_FAILURE; } - QUrl hostUrl = QUrl::fromUserInput(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