Bug 219429

Summary: Dolphin terminal directory change is potentially dangerous
Product: [Applications] dolphin Reporter: Alex Richardson <arichardson.kde>
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED DUPLICATE    
Severity: normal CC: andresbajotierra
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alex Richardson 2009-12-20 15:17:36 UTC
Version:            (using Devel)
Compiler:          GCC 4.4 
OS:                Linux
Installed from:    Compiled sources

Since the way dolphin changes the terminal directory is by send cd + dirname to the terminal, this is potentially dangerous/sometimes annoying.
Imagine someone aliases "rm -rf" with "abcd", types "ab" then changes directory in dolphin (e.g. to /), his complete disk will be wiped (of course assuming he has the rights to do this).
This fact allows any command ending in cd to be executed by mistake.

I had a look into the code to try and fix it, but the terminalinterface is too limiting. The ideal solution would be IMHO to save the currently entered text, the send the cd and then input the saved text again (without sending it as a command). It seems to me that this is only achievable by extending the terminalinterface with methods to get the current text, clear it, and one to append text to the current text. It would also be nice to make the main view follow the current working directory of the terminal, but I should probably open another bug for that.
Comment 1 Dario Andres 2009-12-20 20:31:41 UTC
This is being tracked at bug 161637. Thanks

*** This bug has been marked as a duplicate of bug 161637 ***