summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2020-11-17 09:17:21 +0100
committerGitHub <noreply@github.com>2020-11-17 09:17:21 +0100
commit06686403382a98d23685232d404dfe5837ffb8a1 (patch)
tree95557058b1498a8589f9402d297e953730149776 /src
parent3de7e93a95420a3a6b88ebae03472a4224c71674 (diff)
parent4c822e6563dc16d8e045ba48e8ca9b4e3fb4021a (diff)
Merge pull request #1298 from Holt59/fix-findfiles
Allow '.' in findFiles and filter on file name, not full paths.
Diffstat (limited to 'src')
-rw-r--r--src/organizercore.cpp4
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);
}
}