aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2013-11-27 18:03:02 +0200
committerEli Zaretskii2013-11-27 18:03:02 +0200
commitfb6a5d68e3cbb993a9c72f0bf20e74951e873e72 (patch)
treeaa04b16d9963e2720f629634993fd6d1400ea6cf /lisp
parent1baa1e49d84061e964802eba34713052804185f8 (diff)
downloademacs-fb6a5d68e3cbb993a9c72f0bf20e74951e873e72.tar.gz
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')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/filenotify.el3
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 50f587d1126..3ff0a40b2e4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-11-27 Eli Zaretskii <eliz@gnu.org>
2
3 * filenotify.el (file-notify-add-watch): Don't special-case
4 w32notify when computing the directory to watch.
5
12013-11-27 Glenn Morris <rgm@gnu.org> 62013-11-27 Glenn Morris <rgm@gnu.org>
2 7
3 Make bootstrap without generated uni-*.el files possible again. 8 Make bootstrap without generated uni-*.el files possible again.
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."
237 237
238 (let* ((handler (find-file-name-handler file 'file-notify-add-watch)) 238 (let* ((handler (find-file-name-handler file 'file-notify-add-watch))
239 (dir (directory-file-name 239 (dir (directory-file-name
240 (if (or (and (not handler) (eq file-notify--library 'w32notify)) 240 (if (file-directory-p file)
241 (file-directory-p file))
242 file 241 file
243 (file-name-directory file)))) 242 (file-name-directory file))))
244 desc func l-flags) 243 desc func l-flags)