From: ckamm Date: Mon, 27 Jun 2016 13:13:08 +0000 (+0200) Subject: SocketAPI: Use different pipe name #4977 (#4997) X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1137^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=86fd982b0076390d720a4344f2b4b4dfeea1ba03;p=nextcloud-desktop.git SocketAPI: Use different pipe name #4977 (#4997) Named pipe names that contain backslashes sometimes lead to problems. --- diff --git a/shell_integration/windows/OCUtil/CommunicationSocket.cpp b/shell_integration/windows/OCUtil/CommunicationSocket.cpp index e37487b91..5b419f705 100644 --- a/shell_integration/windows/OCUtil/CommunicationSocket.cpp +++ b/shell_integration/windows/OCUtil/CommunicationSocket.cpp @@ -45,7 +45,7 @@ std::wstring getUserName() { std::wstring CommunicationSocket::DefaultPipePath() { auto pipename = std::wstring(L"\\\\.\\pipe\\"); - pipename += L"ownCloud\\"; + pipename += L"ownCloud-"; pipename += getUserName(); return pipename; } diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp index 47ecb8509..a8874553d 100644 --- a/src/gui/socketapi.cpp +++ b/src/gui/socketapi.cpp @@ -74,7 +74,7 @@ SocketApi::SocketApi(QObject* parent) if (Utility::isWindows()) { socketPath = QLatin1String("\\\\.\\pipe\\") - + QLatin1String("ownCloud") + '\\' + + QLatin1String("ownCloud-") + QString::fromLocal8Bit(qgetenv("USERNAME")); // TODO: once the windows extension supports multiple // client connections, switch back to the theme name