mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Do not change the view URL if it is a symlink to the current directory
BUG: 302037 FIXED-IN: 4.10.3 REVIEW: 110233
This commit is contained in:
parent
9480a1ee44
commit
ff3b009e68
1 changed files with 6 additions and 1 deletions
|
@ -31,6 +31,7 @@
|
||||||
#include <KIO/JobUiDelegate>
|
#include <KIO/JobUiDelegate>
|
||||||
|
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
|
#include <QDir>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
||||||
TerminalPanel::TerminalPanel(QWidget* parent) :
|
TerminalPanel::TerminalPanel(QWidget* parent) :
|
||||||
|
@ -183,8 +184,12 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir)
|
||||||
{
|
{
|
||||||
m_konsolePartCurrentDirectory = 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);
|
const KUrl newUrl(dir);
|
||||||
if (newUrl != url()) {
|
if (newUrl != oldUrl && dir != QDir(oldUrl.path()).canonicalPath()) {
|
||||||
emit changeUrl(newUrl);
|
emit changeUrl(newUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue