From: Nicolas Fella Date: Sat, 21 Mar 2020 14:35:50 +0000 (+0100) Subject: [dolphin] Fix overlays when filename has a colon X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~272^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=20b7e938c504a34e074bb1653204550ec2dbd784;p=nextcloud-desktop.git [dolphin] Fix overlays when filename has a colon When the filename contains a ':' it gets split too much and tokens[2] does not contain the full filename any more. Read the name from the original line instead. Fixes #686 Signed-off-by: Nicolas Fella --- diff --git a/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp b/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp index 56300f4df..d89aa9174 100644 --- a/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp +++ b/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp @@ -83,14 +83,16 @@ private: void slotCommandRecieved(const QByteArray &line) { QList 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;