┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-05-02 19:38:01 +0200
committerFrank Reininghaus <[email protected]>2013-05-02 19:40:01 +0200
commitff3b009e68f485a1a65a7535b01eeeb7128463d2 (patch)
tree40bd413910fdeb46748d1fcafbe34da253ef89c5 /src
parent9480a1ee44e285d2ab4eb1abf98e6e0386fc0c1e (diff)
Do not change the view URL if it is a symlink to the current directory
BUG: 302037 FIXED-IN: 4.10.3 REVIEW: 110233
Diffstat (limited to 'src')
-rw-r--r--src/panels/terminal/terminalpanel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp
index 28c6a9383..bfd3002f0 100644
--- a/src/panels/terminal/terminalpanel.cpp
+++ b/src/panels/terminal/terminalpanel.cpp
@@ -31,6 +31,7 @@
#include <KIO/JobUiDelegate>
#include <QBoxLayout>
+#include <QDir>
#include <QShowEvent>
TerminalPanel::TerminalPanel(QWidget* parent) :
@@ -183,8 +184,12 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir)
{
m_konsolePartCurrentDirectory = dir;
+ // Only change the view URL if 'dir' is different from the current view URL.
+ // Note that the current view URL could also be a symbolic link to 'dir'
+ // -> use QDir::canonicalPath() to check that.
+ const KUrl oldUrl(url());
const KUrl newUrl(dir);
- if (newUrl != url()) {
+ if (newUrl != oldUrl && dir != QDir(oldUrl.path()).canonicalPath()) {
emit changeUrl(newUrl);
}
}