* 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.
(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
(verify-visited-file-modtime nil))))))))
(ert-deftest files-file-name-non-special-notify-handlers ()
- :expected-result :failed
(files-tests--with-temp-file tmpfile
(let* ((nospecial (concat "/:" tmpfile))
(watch (file-notify-add-watch nospecial '(change) #'ignore)))
(should (file-notify-valid-p watch))
(file-notify-rm-watch watch))))
-
(ert-deftest files-file-name-non-special-handlers ()
(files-tests--with-temp-file tmpfile
(files-tests--with-temp-dir tmpdir