SocketAPI: Use different pipe name #4977 (#4997)
authorckamm <mail@ckamm.de>
Mon, 27 Jun 2016 13:13:08 +0000 (15:13 +0200)
committerJocelyn Turcotte <jturcotte@woboq.com>
Mon, 27 Jun 2016 13:13:08 +0000 (15:13 +0200)
Named pipe names that contain backslashes sometimes lead to problems.

shell_integration/windows/OCUtil/CommunicationSocket.cpp
src/gui/socketapi.cpp

index e37487b9162691777facf6b036a73d686b72e427..5b419f7050be9efa46ffdf1480dcb496e6307e21 100644 (file)
@@ -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;
 }
index 47ecb8509ced3a3e782ffa25116b7449fb385dc3..a8874553d543f2c1e783ac05b64d226ff55f2a60 100644 (file)
@@ -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