From c617050efb38c08f63a81cc49877996a5004808f Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 7 Oct 2008 22:05:55 +0000 Subject: improvement to previous commit: check whether the URL can be listed by asking the protocol manager (thanks to David Faure for the hint) svn path=/trunk/KDE/kdebase/apps/; revision=869022 --- src/dolphinviewcontainer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/dolphinviewcontainer.cpp') diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 89ed54aca..bed7d2758 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -350,12 +350,12 @@ void DolphinViewContainer::activate() void DolphinViewContainer::restoreView(const KUrl& url) { - if (url.protocol().isEmpty()) { + if (KProtocolManager::supportsListing(url)) { + m_view->updateView(url, m_urlNavigator->savedRootUrl()); + } else { // The URL navigator only checks for validity, not // if the URL can be listed. - showErrorMessage(i18nc("@info:status", "Protocol not supported")); - } else { - m_view->updateView(url, m_urlNavigator->savedRootUrl()); + showErrorMessage(i18nc("@info:status", "Protocol not supported")); } } -- cgit v1.3