From 11632da7ea36c8c501866aa220cb28365cf110cc Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Tue, 18 Aug 2020 19:31:11 +0200 Subject: Windows shell extensions: Change NCUtil Pipe name from ownCloud to APPLICATION_EXECUTABLE Avoid interference with foreign pipes as this is always a bad idea ;p Signed-off-by: Michael Schuster --- shell_integration/windows/NCUtil/CommunicationSocket.cpp | 4 +++- shell_integration/windows/WinShellExtConstants.h.in | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'shell_integration') diff --git a/shell_integration/windows/NCUtil/CommunicationSocket.cpp b/shell_integration/windows/NCUtil/CommunicationSocket.cpp index cda36c1b8..e0ac699ae 100644 --- a/shell_integration/windows/NCUtil/CommunicationSocket.cpp +++ b/shell_integration/windows/NCUtil/CommunicationSocket.cpp @@ -14,6 +14,7 @@ #include "CommunicationSocket.h" #include "StringUtil.h" +#include "WinShellExtConstants.h" #include #include @@ -42,7 +43,8 @@ std::wstring getUserName() { std::wstring CommunicationSocket::DefaultPipePath() { auto pipename = std::wstring(LR"(\\.\pipe\)"); - pipename += L"ownCloud-"; + pipename += std::wstring(UTIL_PIPE_APP_NAME); + pipename += L"-"; pipename += getUserName(); return pipename; } diff --git a/shell_integration/windows/WinShellExtConstants.h.in b/shell_integration/windows/WinShellExtConstants.h.in index cc0b4e32f..0303ac174 100644 --- a/shell_integration/windows/WinShellExtConstants.h.in +++ b/shell_integration/windows/WinShellExtConstants.h.in @@ -42,3 +42,6 @@ #define OVERLAY_NAME_WARNING L" @APPLICATION_SHORTNAME@Warning" #define OVERLAY_DESCRIPTION L"@APPLICATION_SHORTNAME@ overlay handler" + +// NCUtil +#define UTIL_PIPE_APP_NAME L"@APPLICATION_EXECUTABLE@" -- cgit v1.2.3