From: Frank Reininghaus Date: Thu, 2 May 2013 17:38:01 +0000 (+0200) Subject: Do not change the view URL if it is a symlink to the current directory X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/ff3b009e68f485a1a65a7535b01eeeb7128463d2?ds=sidebyside Do not change the view URL if it is a symlink to the current directory BUG: 302037 FIXED-IN: 4.10.3 REVIEW: 110233 --- 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 #include +#include #include 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); } }