2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Use customWorkingDir() outside of Core::Launcher

This allows to add -workdir to shortcuts only if the process was launched with -workdir
This commit is contained in:
Ilya Fedin
2022-11-21 08:38:14 +04:00
committed by John Preston
parent 9b66b76bac
commit 2f0d14bd35
7 changed files with 48 additions and 15 deletions

View File

@@ -1446,7 +1446,9 @@ void Application::startShortcuts() {
void Application::RegisterUrlScheme() {
base::Platform::RegisterUrlScheme(base::Platform::UrlSchemeDescriptor{
.executable = cExeDir() + cExeName(),
.arguments = qsl("-workdir \"%1\"").arg(cWorkingDir()),
.arguments = Sandbox::Instance().customWorkingDir()
? qsl("-workdir \"%1\"").arg(cWorkingDir())
: QString(),
.protocol = qsl("tg"),
.protocolName = qsl("Telegram Link"),
.shortAppName = qsl("tdesktop"),