mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 21:05:44 +03:00
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 <michael@schuster.ms>
This commit is contained in:
parent
0ba5df597f
commit
11632da7ea
3 changed files with 8 additions and 2 deletions
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "CommunicationSocket.h"
|
||||
#include "StringUtil.h"
|
||||
#include "WinShellExtConstants.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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@"
|
||||
|
|
|
@ -178,7 +178,8 @@ SocketApi::SocketApi(QObject *parent)
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue