Skip to content

Commit

Permalink
Fix files being skipped in coalesced path traersal in mac folder watcher
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Sep 18, 2023
1 parent c44d151 commit 364d0a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/folderwatcher_mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 364d0a8

Please sign in to comment.