Subject: bug#22736: 25.0.91; file-notify calls wrong callbacks

From: Tassilo Horn <[email-masked]>
Date: Fri, 19 Feb 2016 23:59:42 +0100

Michael Albinus <[email-masked]> writes:

Hi Michael and Eli,

>>> The problem is that when there is a directory watch on some
>>> directory and a file watch on a file in that directory, the callback
>>> for the directory watch gets an event with the descriptor of the
>>> file watch.
>>
>> I think this is because when you ask to watch a file, we actually
>> watch its parent directory.
>
> Although we watch the parent directory internally (except with
> kqueue), the given scenario by Tassilo shall work as he expected.
> There shall be two file notification events in the given case, calling
> magit-filenotify--callback and auto-revert-notify-handler with the
> respective descriptor.

Yes, that's exactly what I had expected.

> I'll check.

Thanks!

> Tassilo, would you be willing to write an ert test case for the problem?

Sure, I'm already working on it. :-)

Bye,
Tassilo