D18776: Make sure only directories are added to the inotify watcher
This revision was automatically updated to reflect the committed changes. Closed by commit R293:ee7ea5b55de9: Make sure only directories are added to the inotify watcher (authored by bruns). REPOSITORY R293 Baloo CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18776?vs=51008&id=51072 REVISION DETAIL https://phabricator.kde.org/D18776 AFFECTED FILES src/file/filewatch.cpp To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D18776: Make sure only directories are added to the inotify watcher
ngraham accepted this revision. ngraham added a comment. This revision is now accepted and ready to land. Maybe add a comment above this line explaining the reasoning that you put in the patch's summary section. REPOSITORY R293 Baloo BRANCH master REVISION DETAIL https://phabricator.kde.org/D18776 To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D18776: Make sure only directories are added to the inotify watcher
bruns created this revision. bruns added reviewers: Baloo, Frameworks, poboiko, ngraham. Herald added projects: Frameworks, Baloo. Herald added a subscriber: kde-frameworks-devel. bruns requested review of this revision. REVISION 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/. REPOSITORY R293 Baloo BRANCH master REVISION DETAIL https://phabricator.kde.org/D18776 AFFECTED FILES src/file/filewatch.cpp To: bruns, #baloo, #frameworks, poboiko, ngraham Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams