Skip to content

Commit

Permalink
Add run0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin committed Sep 11, 2024
1 parent f05191e commit ddde93e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Telegram/SourceFiles/platform/linux/launcher_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
const auto launching = justRelaunch
? (cExeDir() + cExeName())
: cWriteProtected()
? u"pkexec"_q
? GLib::find_program_in_path("run0")
? u"run0"_q
: u"pkexec"_q
: (cExeDir() + u"Updater"_q);
argumentsList.push_back(launching.toStdString());

Expand All @@ -61,7 +63,7 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
: launching;
argumentsList.push_back(argv0.toStdString());
} else if (cWriteProtected()) {
// Elevated process that pkexec should launch.
// Elevated process that run0/pkexec should launch.
const auto elevated = cWorkingDir() + u"tupdates/temp/Updater"_q;
argumentsList.push_back(elevated.toStdString());
}
Expand Down

0 comments on commit ddde93e

Please sign in to comment.