From 518251342cfe24bbc6d56afef6d3138fd716ee8d Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Fri, 28 Sep 2018 15:12:17 +0200 Subject: [PATCH] [cli] Always take working dir into account when parsing url Summary: Bug: 399115 When using kdeconnect-cli --share the first argument was not recognised as a file when a relative path was specified. Test Plan: kdeconnect-cli --share File1.txt File2.txt : Check that both files are sent kdeconnect-cli --sahre phabricator.kde.org : Check that web page is opend Reviewers: #kde_connect, apol Reviewed By: #kde_connect, apol Subscribers: apol, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D15787 --- cli/kdeconnect-cli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/kdeconnect-cli.cpp b/cli/kdeconnect-cli.cpp index 695a85df9..8c0f0c552 100644 --- a/cli/kdeconnect-cli.cpp +++ b/cli/kdeconnect-cli.cpp @@ -148,7 +148,7 @@ int main(int argc, char** argv) if (parser.isSet(QStringLiteral("share"))) { QList urls; - QUrl url = QUrl::fromUserInput(parser.value(QStringLiteral("share"))); + QUrl url = QUrl::fromUserInput(parser.value(QStringLiteral("share")), QDir::currentPath()); urls.append(url); //In case there are more arguments, check if they are files and then send them