diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2016-02-07 19:30:01 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2016-02-07 19:30:01 +0100 |
commit | d5a10aefee22cf1d092edad26c845e049ab8861c (patch) | |
tree | 14156a9156b1a3409cab4d24579b5f84892c7012 /lisp/filenotify.el | |
parent | 67fcd5addcd91169f79dc5d51d0a71eb2b486aed (diff) | |
download | emacs-d5a10aefee22cf1d092edad26c845e049ab8861c.tar.gz |
Fix Bug#22557
* lisp/filenotify.el (file-notify-callback): Do not send a
`stopped' event in case of backup by renaming. (Bug#22557)
* test/automated/Makefile.in: Use $(SELECTOR_EXPENSIVE) for
all targets but check and check-maybe.
* test/automated/file-notify-tests.el
(file-notify--test-read-event-timeout): New defconst.
(file-notify--deftest-remote, file-notify--wait-for-events)
(file-notify-test02-events)
(file-notify-test04-file-validity)
(file-notify-test06-many-events): Use it.
(file-notify--test-cleanup): Make it more robust. Delete also
backup file.
(file-notify-test07-backup): New test.
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r-- | lisp/filenotify.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el index faa801ee6e7..66e7fd7a315 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -242,10 +242,14 @@ EVENT is the cadr of the event in `file-notify-handle-event' (and (memq action '(deleted renamed)) (= (length (cdr registered)) 1) + ;; Not, when a file is backed up. + (not (and (stringp file1) (backup-file-name-p file1))) (or + ;; Watched file or directory is concerned. (string-equal (file-name-nondirectory file) (file-name-nondirectory (car registered))) + ;; File inside a watched directory is concerned. (string-equal (file-name-nondirectory file) (car (cadr registered))))))) |