]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
TerminalPanel: better check if terminal needs to change its currentWorkingDirectory...
[dolphin.git] / src / dolphinmainwindow.cpp
index 76b8ded6f5a7045f0f4f4464811c8ac0a34a539b..f043df310c23116fb907f29e384f0d15611e254f 100644 (file)
@@ -1504,7 +1504,7 @@ void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString &mo
         setViewsToHomeIfMountPathOpen(mountPath);
     });
 
-    if (m_terminalPanel && m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
+    if (m_terminalPanel && m_terminalPanel->currentWorkingDirectoryIsParentOf(mountPath)) {
         m_tearDownFromPlacesRequested = true;
         m_terminalPanel->goHome();
         // m_placesPanel->proceedWithTearDown() will be called in slotTerminalDirectoryChanged
@@ -1519,7 +1519,7 @@ void DolphinMainWindow::slotStorageTearDownExternallyRequested(const QString &mo
         setViewsToHomeIfMountPathOpen(mountPath);
     });
 
-    if (m_terminalPanel && m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
+    if (m_terminalPanel && m_terminalPanel->currentWorkingDirectoryIsParentOf(mountPath)) {
         m_tearDownFromPlacesRequested = false;
         m_terminalPanel->goHome();
     }