Avoid interference with foreign pipes as this is always a bad idea ;p
Signed-off-by: Michael Schuster <michael@schuster.ms>
#include "CommunicationSocket.h"
#include "StringUtil.h"
+#include "WinShellExtConstants.h"
#include <iostream>
#include <vector>
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;
}
#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@"
if (Utility::isWindows()) {
socketPath = QLatin1String(R"(\\.\pipe\)")
- + QLatin1String("ownCloud-")
+ + QLatin1String(APPLICATION_EXECUTABLE)
+ + QLatin1String("-")
+ QString::fromLocal8Bit(qgetenv("USERNAME"));
// TODO: once the windows extension supports multiple
// client connections, switch back to the theme name