Skip to content

Commit

Permalink
Shorten socket paths on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Jan 29, 2024
1 parent 852196a commit 5d33290
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions Telegram/SourceFiles/platform/linux/specific_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,13 @@ QString SingleInstanceLocalServerName(const QString &hash) {
+ '.'
+ hash;
}
return hash + '-' + cGUIDStr();
return hash + '-' + QCoreApplication::applicationName();
#else // Q_OS_LINUX && Qt >= 6.2.0
return QDir::tempPath() + '/' + hash + '-' + cGUIDStr();
return QDir::tempPath()
+ '/'
+ hash
+ '-'
+ QCoreApplication::applicationName();
#endif // !Q_OS_LINUX || Qt < 6.2.0
}

Expand Down Expand Up @@ -648,7 +652,7 @@ void start() {
Webview::WebKitGTK::SetSocketPath(u"%1/%2-%3-webview-%4"_q.arg(
QDir::tempPath(),
h,
cGUIDStr(),
QCoreApplication::applicationName(),
u"%1"_q).toStdString());

InstallLauncher();
Expand Down

0 comments on commit 5d33290

Please sign in to comment.