Symlink Support for Dolphin Plugins (#5428)

Add Symlink Support to Dolphin Overlay Plugin
This commit is contained in:
octotree 2017-01-05 13:24:22 +01:00 committed by Markus Goetz
parent adbe5ecf55
commit a1b4984d14
2 changed files with 6 additions and 2 deletions

View file

@ -24,6 +24,7 @@
#include <KIOCore/kfileitem.h>
#include <KIOCore/KFileItemListProperties>
#include <QtWidgets/QAction>
#include <QtCore/QDir>
#include <QtCore/QTimer>
#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) {

View file

@ -21,6 +21,7 @@
#include <KPluginFactory>
#include <QtNetwork/QLocalSocket>
#include <KIOCore/kfileitem.h>
#include <QDir>
#include <QTimer>
#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"));