mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 07:35:12 +00:00
Check actual socket path length rather than InSnap/InFlatpak
This commit is contained in:
@@ -799,10 +799,15 @@ QString AppRuntimeDirectory() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString SingleInstanceLocalServerName(const QString &hash) {
|
QString SingleInstanceLocalServerName(const QString &hash) {
|
||||||
if (InFlatpak() || InSnap()) {
|
const auto idealSocketPath = AppRuntimeDirectory()
|
||||||
|
+ hash
|
||||||
|
+ '-'
|
||||||
|
+ cGUIDStr();
|
||||||
|
|
||||||
|
if (idealSocketPath.size() > 108) {
|
||||||
return AppRuntimeDirectory() + hash;
|
return AppRuntimeDirectory() + hash;
|
||||||
} else {
|
} else {
|
||||||
return AppRuntimeDirectory() + hash + '-' + cGUIDStr();
|
return idealSocketPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user