<table><tr><td style="">bruns added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D18698">View Revision</a></tr></table><br /><div><div><p>Addendum:<br />
I have just checked, <a href="https://phabricator.kde.org/source/baloo/browse/master/src/file/filewatch.cpp$144" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/source/baloo/browse/master/src/file/filewatch.cpp$144</a></p>

<p>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.</p>

<p>Duplicate "created" events is completely fine, these are merged in the "PendingFileQueue".</p>

<p>So I would like you to do the following:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">take the newly added code and create a function from it, e.g. <tt style="background: #ebebeb; font-size: 13px;">handleCreateRecursive(event, path)</tt></li>
<li class="remarkup-list-item">move the <tt style="background: #ebebeb; font-size: 13px;">Q_EMIT created(...)</tt> to the beginning of the function</li>
<li class="remarkup-list-item">call this function for the "EventMoveTo && noCookie)" case</li>
<li class="remarkup-list-item">call this function also for "EventCreated"</li>
</ul>

<p>Probably also add a comment to the function why the manual traversal is needed:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">// 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</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18698">https://phabricator.kde.org/D18698</a></div></div><br /><div><strong>To: </strong>poboiko, Baloo, Frameworks, ngraham, bruns<br /><strong>Cc: </strong>bruns, ngraham, kde-frameworks-devel, Baloo, ashaposhnikov, michaelh, astippich, spoorun, abrahams<br /></div>