From 4c822e6563dc16d8e045ba48e8ca9b4e3fb4021a Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 15 Nov 2020 20:41:26 +0100 Subject: Allow '.' in findFiles and filter on file name, not full paths. --- src/organizercore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index f57903e2..ef9c190f 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -959,13 +959,13 @@ QStringList OrganizerCore::findFiles( { QStringList result; DirectoryEntry *dir = m_DirectoryStructure; - if (!path.isEmpty()) + if (!path.isEmpty() && path != ".") dir = dir->findSubDirectoryRecursive(ToWString(path)); if (dir != nullptr) { std::vector files = dir->getFiles(); for (FileEntryPtr &file: files) { QString fullPath = ToQString(file->getFullPath()); - if (filter(fullPath)) { + if (filter(ToQString(file->getName()))) { result.append(fullPath); } } -- cgit v1.3.1