2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Fix single instance socket path for compatibility with flatpak

This commit is contained in:
Ilya Fedin
2020-01-22 07:12:07 +04:00
committed by John Preston
parent 3a748e20c2
commit ffe037f9f1
7 changed files with 45 additions and 19 deletions

View File

@@ -98,12 +98,7 @@ int Sandbox::start() {
const auto d = QFile::encodeName(QDir(cWorkingDir()).absolutePath());
char h[33] = { 0 };
hashMd5Hex(d.constData(), d.size(), h);
#ifndef OS_MAC_STORE
_localServerName = psServerPrefix() + h + '-' + cGUIDStr();
#else // OS_MAC_STORE
h[4] = 0; // use only first 4 chars
_localServerName = psServerPrefix() + h;
#endif // OS_MAC_STORE
_localServerName = Platform::SingleInstanceLocalServerName(h);
connect(
&_localSocket,