Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Possibly fixes issue #44 -- Improves how file system watcher handles replaced files #2158
It appears that when this bug ( #44 ) happens, the watcher starts handling the filesystem change before the file actually gets recreated. So the new version of the file doesn't exist, and never gets added back to the watcher.
This PR moves the functionality of re-adding the file to the watcher into the timeout handler. In my tests, this gives it enough time for the file to exist again, and thus gets re-added.
I'm not well-versed in QT, so if I should be handling the iteration with a different type of Iterator, or use a different style here, please let me know.