No! This is confusing. I&#39;ll explain with an example -<br><br>Explicitly Watched = A folder on whom an addWatch(...) has been performed.<br>Implicitly Watched = A sub folder of an explicitly watched folder.<br><br>If an explicitly watched folder is deleted/moved/renamed a MoveSelf Event is triggered. No matter what! It does not matter if the parent is watched or not. A MoveSelf event is NOT triggered for an implicitly shared folder.<br>
<br>This is exactly how it should be. Even if we get a MoveSelf event when the parent is being watched, it does not matter. The folder would be removed from being explicitly watched. But it would still be implicitly watched as its parent is still being watched.<br>
<br>So, to summarize, this patch clears up useless watches!<br><br>Vishesh Handa <br><br><div class="gmail_quote">On Tue, May 11, 2010 at 11:18 AM, Sebastian Trüg <span dir="ltr">&lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Vishesh,<br>
<br>
so we only get a moveself if the parent folder is NOT watched. If that<br>
is the case, please commit.<br>
<br>
Cheers,<br>
<font color="#888888">Sebastian<br>
</font><div><div></div><div class="h5"><br>
On 05/11/2010 01:15 AM, Vishesh Handa wrote:<br>
&gt; Hey Sebastian<br>
&gt;<br>
&gt;     &gt; I&#39;ve tested it out. If a directory and its parent are being<br>
&gt;     watched, and<br>
&gt;     &gt; the directory is moved the moveSelf event does *not* occur. The normal<br>
&gt;     &gt; move does occur. :-)<br>
&gt;<br>
&gt;     OK, if that is the case then I suppose your patch is correct. But better<br>
&gt;     add a lengthy comment to the code explaining why we treat moveself as a<br>
&gt;     delete.<br>
&gt;<br>
&gt;<br>
&gt; I refrained from committing as I thought I hadn&#39;t tested it out<br>
&gt; properly. It turns out that I hadn&#39;t. Long story shot. The EventMoveSelf<br>
&gt; event is called in both the cases.<br>
&gt;<br>
&gt; 1. If a folder A is being watched and A is moved.<br>
&gt; 2. If a folder B/A is being watched and so is its parent B.<br>
&gt;<br>
&gt; Here &quot;being watched&quot; means explicitly adding a watch. It does NOT apply<br>
&gt; to sub folders of the watched folder, even though they are also being<br>
&gt; watched. (watches are recursive)<br>
&gt;<br>
&gt; I&#39;ve tested it out properly this time. And it works perfectly. (Try it<br>
&gt; out if you have the time)<br>
&gt;<br>
&gt; - Vishesh Handa<br>
&gt;<br>
</div></div></blockquote></div><br>