diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-11-15 20:41:26 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-11-15 20:41:26 +0100 |
| commit | 4c822e6563dc16d8e045ba48e8ca9b4e3fb4021a (patch) | |
| tree | 0825d82708f8cd92e18304b241fa19339aef9861 /src/organizercore.cpp | |
| parent | 5f7e2988cd91b5debef57c72e12d5a9c1050bce5 (diff) | |
Allow '.' in findFiles and filter on file name, not full paths.
Diffstat (limited to 'src/organizercore.cpp')
| -rw-r--r-- | src/organizercore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<FileEntryPtr> files = dir->getFiles(); for (FileEntryPtr &file: files) { QString fullPath = ToQString(file->getFullPath()); - if (filter(fullPath)) { + if (filter(ToQString(file->getName()))) { result.append(fullPath); } } |
