From a1b4984d149f11c4bd6b9401865fd307560dc750 Mon Sep 17 00:00:00 2001 From: octotree Date: Thu, 5 Jan 2017 13:24:22 +0100 Subject: [PATCH] Symlink Support for Dolphin Plugins (#5428) Add Symlink Support to Dolphin Overlay Plugin --- shell_integration/dolphin/ownclouddolphinactionplugin.cpp | 4 +++- shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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"));