From ad256b632cc161e591259836880e2fba1168e27b Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Thu, 3 Nov 2011 00:16:30 +0800 Subject: [PATCH] Avoid setting $PWD as "." That would cause strange result. For example, run "konsole --workdir .", then bash or zsh would report its current dir as "." This is a follow up of commit 790e835c6fab58a5c4bfe00559d3a4ee97b84e38 --- src/Pty.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Pty.cpp b/src/Pty.cpp index cd5fd132..575e3d97 100644 --- a/src/Pty.cpp +++ b/src/Pty.cpp @@ -134,7 +134,10 @@ char Pty::eraseChar() const void Pty::setInitialWorkingDirectory(const QString& dir) { setWorkingDirectory(dir); - setEnv("PWD", dir); + + // setting PWD to "." will cause problem for bash & zsh + if ( dir != "." ) + setEnv("PWD", dir); } void Pty::addEnvironmentVariables(const QStringList& environment)