prevent excessive tab opening

Without this, KIO::highlightInFileManager() will open additional tab
even if file to be highlighted is already present in current view
This commit is contained in:
Andrey Butirsky 2022-05-18 15:52:26 +03:00
parent 7fed7c9777
commit a4292cf068

View 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);
}