diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1273,16 +1273,21 @@ m_tearDownFromPlacesRequested = true; m_terminalPanel->goHome(); // m_placesPanel->proceedWithTearDown() will be called in slotTerminalDirectoryChanged - } else { - m_placesPanel->proceedWithTearDown(); + return; + } + if (m_activeViewContainer && m_activeViewContainer->url().toLocalFile().startsWith(mountPath)) { + m_activeViewContainer->setUrl(QUrl::fromLocalFile(QDir::homePath())); } + m_placesPanel->proceedWithTearDown(); } void DolphinMainWindow::slotStorageTearDownExternallyRequested(const QString& mountPath) { if (m_terminalPanel && m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) { m_tearDownFromPlacesRequested = false; m_terminalPanel->goHome(); + } else if (m_activeViewContainer && m_activeViewContainer->url().toLocalFile().startsWith(mountPath)) { + m_activeViewContainer->setUrl(QUrl::fromLocalFile(QDir::homePath())); } }