]> cloud.milkyroute.net Git - dolphin.git/commitdiff
prevent excessive tab opening
authorAndrey Butirsky <butirsky@gmail.com>
Wed, 18 May 2022 12:52:26 +0000 (15:52 +0300)
committerAndrey Butirsky <butirsky@gmail.com>
Tue, 24 May 2022 17:11:37 +0000 (17:11 +0000)
Without this, KIO::highlightInFileManager() will open additional tab
even if file to be highlighted is already present in current view

src/dolphintabwidget.cpp

index 254e654a798c421c7d0d5a87b3630f0073bbd863..5586c9df26ad8887e6c159bdb5bb8646e719fbc0 100644 (file)
@@ -236,7 +236,7 @@ void DolphinTabWidget::openFiles(const QList<QUrl>& files, bool splitView)
     // directories are shown inside one tab (see openDirectories()).
     QList<QUrl> dirs;
     for (const QUrl& url : files) {
-        const QUrl dir(url.adjusted(QUrl::RemoveFilename));
+        const QUrl dir(url.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash));
         if (!dirs.contains(dir)) {
             dirs.append(dir);
         }