Do not change home directory when using kdesudo

This improves system responsiveness and brings the actual behaviour more in line with what is expected


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesudo@1250814 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent f2b438647d
commit 9236340191

@ -59,6 +59,7 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
bool realtime = args->isSet("r");
bool priority = args->isSet("p");
bool showCommand = (!args->isSet("d"));
bool keepCurrentHome = true;
bool changeUID = true;
bool noExec = false;
keepPwd = (!args->isSet("n"));
@ -219,7 +220,12 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
{
if (changeUID)
{
*p << "sudo" << "-H" << "-S" << "-p" << "passprompt";
*p << "sudo";
if (!keepCurrentHome)
*p << "-H";
*p << "-S" << "-p" << "passprompt";
if (!runas.isEmpty())
*p << "-u" << runas;

Loading…
Cancel
Save