summaryrefslogtreecommitdiffstats
path: root/konsole/konsole/konsole.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konsole/konsole/konsole.cpp')
-rw-r--r--konsole/konsole/konsole.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp
index ef3079654..b76a5c4b1 100644
--- a/konsole/konsole/konsole.cpp
+++ b/konsole/konsole/konsole.cpp
@@ -3421,9 +3421,7 @@ void Konsole::addSessionCommand(const TQString &path)
// try to locate the binary
TQString exec= co->readPathEntry("Exec");
- if (exec.startsWith("sudo su -c \'")) {
- exec = exec.mid(12,exec.length()-13);
- }
+ exec.remove(TQRegExp("^(sudo )?su (- )?-c ?\'"));
exec = KRun::binaryName(exec, false);
exec = KShell::tildeExpand(exec);