From: octotree Date: Thu, 5 Jan 2017 12:24:22 +0000 (+0100) Subject: Symlink Support for Dolphin Plugins (#5428) X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~922 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a1b4984d149f11c4bd6b9401865fd307560dc750;p=nextcloud-desktop.git Symlink Support for Dolphin Plugins (#5428) Add Symlink Support to Dolphin Overlay Plugin --- diff --git a/shell_integration/dolphin/ownclouddolphinactionplugin.cpp b/shell_integration/dolphin/ownclouddolphinactionplugin.cpp index 058f5c265..dfb2bdff7 100644 --- a/shell_integration/dolphin/ownclouddolphinactionplugin.cpp +++ b/shell_integration/dolphin/ownclouddolphinactionplugin.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "ownclouddolphinpluginhelper.h" @@ -43,7 +44,8 @@ public: auto url = urls.first(); if (!url.isLocalFile()) return {}; - auto localFile = url.toLocalFile(); + QDir localPath(url.toLocalFile()); + auto localFile = localPath.canonicalPath(); const auto paths = helper->paths(); if (!std::any_of(paths.begin(), paths.end(), [&](const QString &s) { diff --git a/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp b/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp index 4d3230c81..56300f4df 100644 --- a/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp +++ b/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "ownclouddolphinpluginhelper.h" @@ -46,7 +47,8 @@ public: return QStringList(); if (!url.isLocalFile()) return QStringList(); - const QByteArray localFile = url.toLocalFile().toUtf8(); + QDir localPath(url.toLocalFile()); + const QByteArray localFile = localPath.canonicalPath().toUtf8(); helper->sendCommand(QByteArray("RETRIEVE_FILE_STATUS:" + localFile + "\n"));