From: Michael Albinus Date: Sat, 5 Jan 2019 15:01:02 +0000 (+0100) Subject: Improve file-notify-callback. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4be6b83a7a2289bac4ce23166144ba5976c6ce63;p=emacs.git Improve file-notify-callback. * lisp/filenotify.el (file-notify-callback): Improve check for `stopped' event. --- 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