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

Reply via email to