From 9ca3546e594ac1f1c4aff8b4bfaf589e811f6825 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 6 Oct 2021 10:06:10 +0200 Subject: [PATCH] Fix that ".." was no longer cleaned in file system locator filter Amends 66bf957618848cfa243a88a8f2909167d3535d27 Fixes: QTCREATORBUG-26368 Change-Id: I0b90b1a6b6d4bd1bdbf135f0447702d6a85bb9e4 Reviewed-by: Orgad Shaneh Reviewed-by: Qt CI Bot --- src/plugins/coreplugin/locator/filesystemfilter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/locator/filesystemfilter.cpp b/src/plugins/coreplugin/locator/filesystemfilter.cpp index 95c9bf16ea2..9e0751e570f 100644 --- a/src/plugins/coreplugin/locator/filesystemfilter.cpp +++ b/src/plugins/coreplugin/locator/filesystemfilter.cpp @@ -176,8 +176,9 @@ void FileSystemFilter::accept(LocatorFilterEntry selection, { Q_UNUSED(selectionLength) if (selection.filePath.isDir()) { - const QString value = shortcutString() + ' ' - + selection.filePath.absoluteFilePath().toUserOutput() + '/'; + const QString value + = shortcutString() + ' ' + + selection.filePath.absoluteFilePath().cleanPath().pathAppended("/").toUserOutput(); *newText = value; *selectionStart = value.length(); } else {