[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.2/kdebase/apps/dolphin/src
From:       Frank Reininghaus <frank78ac () googlemail ! com>
Date:       2009-05-17 19:59:48
Message-ID: 1242590388.378578.16638.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 969267 by freininghaus:

Update the directory of the Terminal Panel if the current URL is not a
"file:" URL, but is nevertheless local (e.g., "desktop:").

Fix will be in KDE 4.2.4.

CCBUG: 167810


 M  +4 -2      terminalsidebarpage.cpp  


--- branches/KDE/4.2/kdebase/apps/dolphin/src/terminalsidebarpage.cpp #969266:969267
@@ -23,6 +23,7 @@
 #include <kde_terminal_interface.h>
 #include <kparts/part.h>
 #include <kshell.h>
+#include <kio/netaccess.h>
 
 #include <QBoxLayout>
 #include <QShowEvent>
@@ -55,8 +56,9 @@
     }
 
     SidebarPage::setUrl(url);
-    if ((m_terminal != 0) && isVisible() && url.isLocalFile()) {
-        m_terminal->sendInput("cd " + KShell::quoteArg(url.path()) + '\n');
+    KUrl mostLocalUrl = KIO::NetAccess::mostLocalUrl(url, 0);
+    if ((m_terminal != 0) && isVisible() && mostLocalUrl.isLocalFile()) {
+        m_terminal->sendInput("cd " + KShell::quoteArg(mostLocalUrl.path()) + '\n');
     }
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic