Commit 1281e2e1 authored by Frank Reininghaus's avatar Frank Reininghaus
Browse files

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

svn path=/branches/KDE/4.2/kdebase/apps/; revision=969267
parent f996d72c
......@@ -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 @@ void TerminalSidebarPage::setUrl(const KUrl& url)
}
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');
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment