Fix SFTP plugin on Windows
Broken by https://invent.kde.org/network/kdeconnect-android/-/merge_requests/320
This commit is contained in:
parent
17519fdb7a
commit
4d5474db7b
1 changed files with 9 additions and 1 deletions
|
@ -50,10 +50,18 @@ void SftpPlugin::receivePacket(const NetworkPacket &np)
|
|||
|
||||
QString path;
|
||||
if (np.has(QStringLiteral("multiPaths"))) {
|
||||
QStringList paths = np.get<QStringList>(QStringLiteral("multiPaths"));
|
||||
if (paths.size() == 1) {
|
||||
path = paths[0];
|
||||
} else {
|
||||
path = QStringLiteral("/");
|
||||
}
|
||||
} else {
|
||||
path = np.get<QString>(QStringLiteral("path"));
|
||||
}
|
||||
if (!path.endsWith(QChar::fromLatin1('/'))) {
|
||||
path += QChar::fromLatin1('/');
|
||||
}
|
||||
|
||||
QString url_string = QStringLiteral("sftp://%1:%2@%3:%4%5")
|
||||
.arg(np.get<QString>(QStringLiteral("user")),
|
||||
|
|
Loading…
Reference in a new issue