]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Dolphin Plugin: Use the Application name for the socket path (#5172)
authorKlaas Freitag <freitag@owncloud.com>
Mon, 12 Sep 2016 12:12:33 +0000 (14:12 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Thu, 22 Sep 2016 07:20:47 +0000 (09:20 +0200)
do not hardcode.

This should fix #5165
(cherry picked from commit 2d110540ee5a67d2c014fcf4258840d3aaf538ac)

shell_integration/dolphin/ownclouddolphinpluginhelper.cpp

index 027e0e68eefa3c712676af7ea54766031d913d60..68c2a9c2975005fb5f917afc9f0275f67c7a7eaa 100644 (file)
@@ -21,6 +21,7 @@
 #include <qcoreevent.h>
 #include <QFile>
 #include "ownclouddolphinpluginhelper.h"
+#include "config.h"
 
 OwncloudDolphinPluginHelper* OwncloudDolphinPluginHelper::instance()
 {
@@ -67,7 +68,10 @@ void OwncloudDolphinPluginHelper::tryConnect()
         return;
     }
     QString runtimeDir = QFile::decodeName(qgetenv("XDG_RUNTIME_DIR"));
-    QString socketPath = runtimeDir + QLatin1String("/ownCloud/socket");
+    runtimeDir.append( QChar('/'));
+    runtimeDir.append( QLatin1String(APPLICATION_SHORTNAME) );
+
+    const QString socketPath = runtimeDir + QLatin1String("/socket");
     _socket.connectToServer(socketPath);
 }