D18698: [baloo/KInotify] Notify if folder was moved from unwatched place

Stefan BrĂ¼ns noreply at phabricator.kde.org
Tue Feb 5 17:13:27 GMT 2019


bruns added a comment.


  Addendum:
  I have just checked, https://phabricator.kde.org/source/baloo/browse/master/src/file/filewatch.cpp$144
  
  filewatch relies on the code here to emit created events for all children, so we need the traversal code not only for "moved", but also for "created", as otherwise we may miss some "created" events.
  
  Duplicate "created" events is completely fine, these are merged in the "PendingFileQueue".
  
  So I would like you to do the following:
  
  - take the newly added code and create a function from it, e.g. `handleCreateRecursive(event, path)`
  - move the `Q_EMIT created(...)` to the beginning of the function
  - call this function for the "EventMoveTo && noCookie)" case
  - call this function also for "EventCreated"
  
  Probably also add a comment to the function why the manual traversal is needed:
  
    // Files/directories inside the new directory may be created before the watch
    // is installed. Ensure created events for all children are issued at least once

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D18698

To: poboiko, #baloo, #frameworks, ngraham, bruns
Cc: bruns, ngraham, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190205/804499b8/attachment.html>


More information about the Kde-frameworks-devel mailing list