diff options
Diffstat (limited to 'src/panels/terminal/terminalpanel.cpp')
| -rw-r--r-- | src/panels/terminal/terminalpanel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index ae5e45f09..8ee46d7a4 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -23,6 +23,7 @@ #include <kde_terminal_interface_v2.h> #include <kparts/part.h> #include <kshell.h> +#include <kio/netaccess.h> #include <QBoxLayout> #include <QShowEvent> @@ -57,12 +58,13 @@ void TerminalPanel::setUrl(const KUrl& url) } Panel::setUrl(url); + KUrl mostLocalUrl = KIO::NetAccess::mostLocalUrl(url, 0); const bool sendInput = (m_terminal != 0) && (m_terminal->foregroundProcessId() == -1) && isVisible() - && url.isLocalFile(); + && mostLocalUrl.isLocalFile(); if (sendInput) { - m_terminal->sendInput("cd " + KShell::quoteArg(url.toLocalFile()) + '\n'); + m_terminal->sendInput("cd " + KShell::quoteArg(mostLocalUrl.toLocalFile()) + '\n'); } } |
