summaryrefslogtreecommitdiff
path: root/lisp/filenotify.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-11-27 18:03:02 +0200
committerEli Zaretskii <eliz@gnu.org>2013-11-27 18:03:02 +0200
commitfb6a5d68e3cbb993a9c72f0bf20e74951e873e72 (patch)
treeaa04b16d9963e2720f629634993fd6d1400ea6cf /lisp/filenotify.el
parent1baa1e49d84061e964802eba34713052804185f8 (diff)
downloademacs-fb6a5d68e3cbb993a9c72f0bf20e74951e873e72.tar.gz
emacs-fb6a5d68e3cbb993a9c72f0bf20e74951e873e72.tar.bz2
emacs-fb6a5d68e3cbb993a9c72f0bf20e74951e873e72.zip
Fix watching directories using w32notify.c.
src/w32notify.c (Fw32notify_add_watch): If the argument FILE is a directory, watch it and not its parent. (add_watch): Allow empty string in FILE. lisp/filenotify.el (file-notify-add-watch): Don't special-case w32notify when computing the directory to watch.
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r--lisp/filenotify.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index c980d720714..72ee0ced785 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -237,8 +237,7 @@ FILE is the name of the file whose event is being reported."
(let* ((handler (find-file-name-handler file 'file-notify-add-watch))
(dir (directory-file-name
- (if (or (and (not handler) (eq file-notify--library 'w32notify))
- (file-directory-p file))
+ (if (file-directory-p file)
file
(file-name-directory file))))
desc func l-flags)