diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2018-01-26 11:57:41 +0100 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2019-01-02 13:22:58 +0100 |
commit | 08840f2f7bfc6144bd163dd85efe87d28541e425 (patch) | |
tree | 18260c709c5914a36048a834df1dd0c15eb29cf1 | |
parent | e0870c38016b2e824768fe692ba3c21bb9aec341 (diff) | |
download | emacs-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.el | 5 |
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 |