Fix review comments + also check against trailing bakslash.

Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
alex-z 2021-09-25 11:59:12 +03:00 committed by Matthieu Gallien (Rebase PR Action)
parent e16402a102
commit dc22307a42

View 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