Rework file notifications, kqueue has problems with directory monitors
commit8eca1d457083c8b1f46f8addbc695a6119ffb9ad
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 20 Nov 2015 18:06:42 +0000 (20 18:06 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 20 Nov 2015 18:06:42 +0000 (20 18:06 +0000)
tree32cb676738c714797cdb4663fb31c481135e73a1
parent83d429b0ad0d73df68b79dd94d7c95256e01fdc0
Rework file notifications, kqueue has problems with directory monitors

* lisp/filenotify.el (file-notify-add-watch): Call the native
add-watch function on the file, not on the dir.

* src/kqueue.c (kqueue_compare_dir_list): Make also bookkeeping
about already deleted entries.

* test/automated/auto-revert-tests.el
(auto-revert-test01-auto-revert-several-files): Do not call "cp -f"
since this deletes the target file first.

* test/automated/file-notify-tests.el (file-notify--test-event-test):
Make stronger checks.
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Rewrite in order to call file monitors but directory monitors.
(file-notify-test06-many-events): Ler rename work in both directions.
lisp/filenotify.el
src/kqueue.c
test/automated/auto-revert-tests.el
test/automated/file-notify-tests.el