diff options
| author | Michael Albinus | 2018-01-26 11:57:41 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2019-01-02 13:22:58 +0100 |
| commit | 08840f2f7bfc6144bd163dd85efe87d28541e425 (patch) | |
| tree | 18260c709c5914a36048a834df1dd0c15eb29cf1 | |
| parent | e0870c38016b2e824768fe692ba3c21bb9aec341 (diff) | |
| download | emacs-08840f2f7bfc6144bd163dd85efe87d28541e425.tar.gz emacs-08840f2f7bfc6144bd163dd85efe87d28541e425.zip | |
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." | |||
| 307 | (unless (functionp callback) | 307 | (unless (functionp callback) |
| 308 | (signal 'wrong-type-argument `(,callback))) | 308 | (signal 'wrong-type-argument `(,callback))) |
| 309 | 309 | ||
| 310 | (let* ((handler (find-file-name-handler file 'file-notify-add-watch)) | 310 | (let* ((quoted (file-name-quoted-p file)) |
| 311 | (file (file-name-unquote file)) | ||
| 312 | (file-name-handler-alist (if quoted nil file-name-handler-alist)) | ||
| 313 | (handler (find-file-name-handler file 'file-notify-add-watch)) | ||
| 311 | (dir (directory-file-name | 314 | (dir (directory-file-name |
| 312 | (if (file-directory-p file) | 315 | (if (file-directory-p file) |
| 313 | file | 316 | file |