]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle quoted file names in filenotify.el
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 26 Jan 2018 10:57:41 +0000 (11:57 +0100)
committerPhilipp Stephani <phst@google.com>
Wed, 2 Jan 2019 12:22:58 +0000 (13:22 +0100)
* 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.

lisp/filenotify.el

index 08a6f6efb650498b493196c7ce04e56d4605021d..101ddb6be097454d1b7affc00ca9e44fee6df341 100644 (file)
@@ -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