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); } } }