+void DolphinViewContainer::slotCurrentDirectoryRemoved()
+{
+ const QString location(url().toDisplayString(QUrl::PreferLocalFile));
+ if (url().isLocalFile()) {
+ const QString dirPath = url().toLocalFile();
+ const QString newPath = getNearestExistingAncestorOfPath(dirPath);
+ const QUrl newUrl = QUrl::fromLocalFile(newPath);
+ setUrl(newUrl);
+ }
+
+ showMessage(xi18n("Current location changed, <filename>%1</filename> is no longer accessible.", location), Warning);
+}
+