summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2018-01-26 11:57:41 +0100
committerPhilipp Stephani <phst@google.com>2019-01-02 13:22:58 +0100
commit08840f2f7bfc6144bd163dd85efe87d28541e425 (patch)
tree18260c709c5914a36048a834df1dd0c15eb29cf1
parente0870c38016b2e824768fe692ba3c21bb9aec341 (diff)
downloademacs-08840f2f7bfc6144bd163dd85efe87d28541e425.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.
-rw-r--r--lisp/filenotify.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 08a6f6efb65..101ddb6be09 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