mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Version 4.10: Fix spawning args on Linux.
This commit is contained in:
parent
0d25b154d9
commit
16b1881268
1 changed files with 8 additions and 7 deletions
|
@ -54,13 +54,14 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
|
|||
: (cExeDir() + u"Updater"_q);
|
||||
argumentsList.push_back(launching.toStdString());
|
||||
|
||||
// argv[0] that is passed to what we are launching.
|
||||
const auto argv0 = (justRelaunch && !arguments().isEmpty())
|
||||
? arguments().first()
|
||||
: launching;
|
||||
argumentsList.push_back(argv0.toStdString());
|
||||
|
||||
if (!justRelaunch && cWriteProtected()) {
|
||||
if (justRelaunch) {
|
||||
// argv[0] that is passed to what we are launching.
|
||||
// It should be added explicitly in case of FILE_AND_ARGV_ZERO_.
|
||||
const auto argv0 = !arguments().isEmpty()
|
||||
? arguments().first()
|
||||
: launching;
|
||||
argumentsList.push_back(argv0.toStdString());
|
||||
} else if (cWriteProtected()) {
|
||||
// Elevated process that pkexec should launch.
|
||||
const auto elevated = cWorkingDir() + u"tupdates/temp/Updater"_q;
|
||||
argumentsList.push_back(elevated.toStdString());
|
||||
|
|
Loading…
Add table
Reference in a new issue