Workaround broken kdesu backward compatibility.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1278089
This commit is contained in:
parent
9eef711325
commit
c987402691
|
@ -84,7 +84,19 @@ bool checkPermissions()
|
|||
// endless loops of calling the same non-working (kde|gk)su(do) binary again and again.
|
||||
if (!suCommand().isEmpty() && !args->isSet("dontsu"))
|
||||
{
|
||||
if (QProcess::execute(suCommand(), QStringList() << args->allArguments().join(" ") + " --dontsu") == 0)
|
||||
QStringList argList;
|
||||
|
||||
const QString suCmd = suCommand();
|
||||
|
||||
// kdesu broke backward compatibility at some point and now only works with "-c";
|
||||
// kdesudo accepts either (with or without "-c"), but the gk* helpers only work
|
||||
// without. kdesu maintainers won't fix their app, so we need to work around that here.
|
||||
if (suCmd.startsWith("kde"))
|
||||
argList << "-c";
|
||||
|
||||
argList << args->allArguments().join(" ") + " --dontsu";
|
||||
|
||||
if (QProcess::execute(suCmd, argList) == 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue