]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve file-notify-callback.
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 5 Jan 2019 15:01:02 +0000 (16:01 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 5 Jan 2019 15:01:02 +0000 (16:01 +0100)
* lisp/filenotify.el (file-notify-callback): Improve check for
`stopped' event.

lisp/filenotify.el

index c79bc4fb60215a73dfa135f88b72fde4115e27ed..89fae27253d81df32244f3ac7ff22fed3a98a99b 100644 (file)
@@ -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