]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Prevent accidental deletion of home directory in Terminal Panel
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 14 Mar 2013 23:12:33 +0000 (00:12 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 14 Mar 2013 23:12:49 +0000 (00:12 +0100)
The protection against unwanted execution of "rm -rf" when changing the
directory while entering the command did not work if there was never any
automatic "cd" command sent to the terminal before.

This patch ensures that Terminal Panel's member m_clearTerminal is
false after the initialization of the panel, such that the protection is
effective after that.

BUG: 316300
FIXED-IN: 4.10.2
REVIEW: 109431

src/panels/terminal/terminalpanel.cpp

index f6d3a5981c8d5977b52d7197f5af8615e3a0eb52..28c6a9383fd67e505b88958bdadeef9c8e1ec342 100644 (file)
@@ -144,6 +144,7 @@ void TerminalPanel::changeDir(const KUrl& url)
 void TerminalPanel::sendCdToTerminal(const QString& dir)
 {
     if (dir == m_konsolePartCurrentDirectory) {
+        m_clearTerminal = false;
         return;
     }