summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/MyPty.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp
index c3c58be..23d4966 100644
--- a/noncore/apps/opie-console/MyPty.cpp
+++ b/noncore/apps/opie-console/MyPty.cpp
@@ -298,17 +298,15 @@ void MyPty::reload( const Profile& prof) {
298 * exists.... 298 * exists....
299 * we try to use bin/bash and if 299 * we try to use bin/bash and if
300 * this fails we 300 * this fails we
301 * will fallback to /bin/sh 301 * will fallback to /bin/sh
302 * which should be there 100% 302 * which should be there 100%
303 */ 303 */
304 if ( !QFile::exists(QFile::encodeName(m_cmd) ) ) 304 if ( m_cmd.stripWhiteSpace() == "/bin/bash" && !QFile::exists(QFile::encodeName(m_cmd) ) )
305 if (QFile::exists("/bin/bash") )
306 m_cmd = "/bin/bash";
307 else
308 m_cmd = "/bin/sh"; 305 m_cmd = "/bin/sh";
306
309 307
310 int envcount = prof.readNumEntry("EnvVars", 0); 308 int envcount = prof.readNumEntry("EnvVars", 0);
311 for (int i=0; i<envcount; i++) { 309 for (int i=0; i<envcount; i++) {
312 QString name = prof.readEntry("Env_Name_" + QString::number(i), ""); 310 QString name = prof.readEntry("Env_Name_" + QString::number(i), "");
313 QString value = prof.readEntry("Env_Value_" + QString::number(i), ""); 311 QString value = prof.readEntry("Env_Value_" + QString::number(i), "");
314 if (!(name.isEmpty() || value.isEmpty())) { 312 if (!(name.isEmpty() || value.isEmpty())) {