From 86fd982b0076390d720a4344f2b4b4dfeea1ba03 Mon Sep 17 00:00:00 2001 From: ckamm Date: Mon, 27 Jun 2016 15:13:08 +0200 Subject: [PATCH] SocketAPI: Use different pipe name #4977 (#4997) Named pipe names that contain backslashes sometimes lead to problems. --- shell_integration/windows/OCUtil/CommunicationSocket.cpp | 2 +- src/gui/socketapi.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.30.2