2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use ExecutablePathForShortcuts in PortalAutostart

This commit is contained in:
Ilya Fedin
2024-03-08 15:03:47 +04:00
committed by John Preston
parent 0df8864ae0
commit 296e8c1ab1

View File

@@ -60,7 +60,8 @@ using namespace Platform;
using Platform::internal::WaylandIntegration;
void PortalAutostart(bool enabled, Fn<void(bool)> done) {
if (cExeName().isEmpty()) {
const auto executable = ExecutablePathForShortcuts();
if (executable.isEmpty()) {
if (done) {
done(false);
}
@@ -149,7 +150,7 @@ void PortalAutostart(bool enabled, Fn<void(bool)> done) {
std::vector<std::string> commandline;
commandline.push_back(cExeName().toStdString());
commandline.push_back(executable.toStdString());
if (Core::Launcher::Instance().customWorkingDir()) {
commandline.push_back("-workdir");
commandline.push_back(cWorkingDir().toStdString());