Subject: bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted

From: Eli Zaretskii <[email-masked]>
Date: Tue, 08 Sep 2015 18:51:52 +0300

> From: Michael Albinus <[email-masked]>
> Cc: [email-masked], Eli Zaretskii <[email-masked]>
> Date: Tue, 08 Sep 2015 09:47:07 +0200
> 
> `file-notify-valid-p' is a nice idea; I will see how I could add it. At
> least for the w32 case I would need some help from Eli, in order to
> see whether the native library supports such a check.

What happens on w32 when a watched directory is deleted is that the
thread which watches the changes exits (with an abnormal status), but
the object created to watch the changes still exists, and can be
easily tested for being "invalid".

So if you want to implement file-notify-valid-p, go ahead; the w32
side will be almost trivial.