From 4be6b83a7a2289bac4ce23166144ba5976c6ce63 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 5 Jan 2019 16:01:02 +0100 Subject: [PATCH] Improve file-notify-callback. * lisp/filenotify.el (file-notify-callback): Improve check for `stopped' event. --- lisp/filenotify.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/filenotify.el b/lisp/filenotify.el index c79bc4fb602..89fae27253d 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -253,8 +253,10 @@ EVENT is the cadr of the event in `file-notify-handle-event' ;; Not, when a file is backed up. (not (and (stringp file1) (backup-file-name-p file1))) ;; Watched file or directory is concerned. - (string-equal - file (file-notify--event-watched-file event)))) + (or (string-equal + file (file-notify--event-watched-file event)) + (string-equal + file (file-notify--watch-directory watch))))) (file-notify-rm-watch desc))))))) ;; `kqueue', `gfilenotify' and `w32notify' return a unique descriptor -- 2.39.5