summaryrefslogtreecommitdiff
path: root/lisp/filenotify.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2018-01-26 11:57:41 +0100
committerNoam Postavsky <npostavs@gmail.com>2018-02-01 20:15:12 -0500
commite08de2bae2a8e91c0245259dfcbfdca1d191a119 (patch)
treea79bfb9080a90f31c8106898b1418bf8addb9e74 /lisp/filenotify.el
parent00c65bcf4ee8ca4ce04ad46907de29c832b8310b (diff)
downloademacs-e08de2bae2a8e91c0245259dfcbfdca1d191a119.tar.gz
Handle quoted file names in filenotify.el
* lisp/filenotify.el (file-notify-add-watch): Do not save quoted file names in `file-notify-descriptors'. * test/lisp/files-tests.el (files-file-name-non-special-notify-handlers): Do not expect to fail.
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r--lisp/filenotify.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 562ac266e44..442dc891571 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -307,7 +307,10 @@ FILE is the name of the file whose event is being reported."
(unless (functionp callback)
(signal 'wrong-type-argument `(,callback)))
- (let* ((handler (find-file-name-handler file 'file-notify-add-watch))
+ (let* ((quoted (file-name-quoted-p file))
+ (file (file-name-unquote file))
+ (file-name-handler-alist (if quoted nil file-name-handler-alist))
+ (handler (find-file-name-handler file 'file-notify-add-watch))
(dir (directory-file-name
(if (file-directory-p file)
file