From 364d0a88c74e497fce10fdd4a97d99d36e95fef7 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 18 Sep 2023 11:32:55 +0800 Subject: [PATCH] Fix files being skipped in coalesced path traersal in mac folder watcher Signed-off-by: Claudio Cambra --- src/gui/folderwatcher_mac.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/folderwatcher_mac.cpp b/src/gui/folderwatcher_mac.cpp index d81ae22169ea6..588b94a27b561 100644 --- a/src/gui/folderwatcher_mac.cpp +++ b/src/gui/folderwatcher_mac.cpp @@ -124,11 +124,11 @@ QStringList FolderWatcherPrivate::addCoalescedPaths(const QStringList &paths) co QStringList coalescedPaths; for (const auto &eventPath : paths) { if (QDir(eventPath).exists()) { - QDirIterator it(eventPath, QDir::AllDirs | QDir::NoDotAndDotDot, QDirIterator::Subdirectories); + QDirIterator it(eventPath, QDir::AllDirs | QDir::NoDotAndDotDot | QDir::Files, QDirIterator::Subdirectories); while (it.hasNext()) { - auto subfolder = it.next(); - if (!paths.contains(subfolder)) { - coalescedPaths.append(subfolder); + const auto path = it.next(); + if (!paths.contains(path)) { + coalescedPaths.append(path); } } }