Make sure only directories are added to the inotify watcher
ClosedPublic

Authored by bruns on Feb 6 2019, 12:12 AM.

Details

Summary

Although watchFolder is only called for directories, there is a small
time frame where the just added directory has been deleted and a file
with the same path has been created. This race condition can be avoided
by adding the KInotify::FlagOnlyDir filter flag.

This has been documented also in e.g. https://lwn.net/Articles/605128/.

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Feb 6 2019, 12:12 AM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptFeb 6 2019, 12:12 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Feb 6 2019, 12:12 AM
ngraham accepted this revision.Feb 6 2019, 12:33 AM

Maybe add a comment above this line explaining the reasoning that you put in the patch's summary section.

This revision is now accepted and ready to land.Feb 6 2019, 12:33 AM
This revision was automatically updated to reflect the committed changes.