1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2025-02-24 09:45:59 +01:00

Merge pull request from nicolasfella/colon

[dolphin] Fix overlays when filename has a colon
This commit is contained in:
Dominique Fuchs 2020-04-25 12:17:29 +02:00 committed by GitHub
commit 79eface432
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,14 +83,16 @@ private:
void slotCommandRecieved(const QByteArray &line) {
QList<QByteArray> tokens = line.split(':');
if (tokens.count() != 3)
if (tokens.count() < 3)
return;
if (tokens[0] != "STATUS" && tokens[0] != "BROADCAST")
return;
if (tokens[2].isEmpty())
return;
const QByteArray name = tokens[2];
// We can't use tokens[2] because the filename might contain ':'
int secondColon = line.indexOf(":", line.indexOf(":") + 1);
const QByteArray name = line.mid(secondColon + 1);
QByteArray &status = m_status[name]; // reference to the item in the hash
if (status == tokens[1])
return;