Dolphin Plugin: Use the Application name for the socket path (#5172)

do not hardcode.

This should fix #5165
This commit is contained in:
Klaas Freitag 2016-09-12 14:12:33 +02:00 committed by GitHub
parent d5a481f132
commit 2d110540ee

View 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);
}