From 08aef4f407f05be0cc05b7beec782fcb79a8a1a5 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 31 Jan 2019 12:47:44 +0100 Subject: [PATCH] Windows: Use better name for SocketAPI socket #6983 --- shell_integration/windows/OCUtil/CommunicationSocket.cpp | 5 ++++- src/gui/socketapi.cpp | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/shell_integration/windows/OCUtil/CommunicationSocket.cpp b/shell_integration/windows/OCUtil/CommunicationSocket.cpp index b7dd64c32c..6f6f7f9d8d 100644 --- a/shell_integration/windows/OCUtil/CommunicationSocket.cpp +++ b/shell_integration/windows/OCUtil/CommunicationSocket.cpp @@ -18,6 +18,8 @@ #include "UtilConstants.h" #include "StringUtil.h" +#include "config.h" + #include #include #include @@ -45,7 +47,8 @@ std::wstring getUserName() { std::wstring CommunicationSocket::DefaultPipePath() { auto pipename = std::wstring(L"\\\\.\\pipe\\"); - pipename += L"ownCloud-"; + pipename += APPLICATION_SHORTNAME; + pipename += L"-" pipename += getUserName(); return pipename; } diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp index bc8ac7e9f7..04e7275cbf 100644 --- a/src/gui/socketapi.cpp +++ b/src/gui/socketapi.cpp @@ -180,7 +180,8 @@ SocketApi::SocketApi(QObject *parent) if (Utility::isWindows()) { socketPath = QLatin1String("\\\\.\\pipe\\") - + QLatin1String("ownCloud-") + + QLatin1String(APPLICATION_SHORTNAME) + + QLatin1String("-") + QString::fromLocal8Bit(qgetenv("USERNAME")); // TODO: once the windows extension supports multiple // client connections, switch back to the theme name