summaryrefslogtreecommitdiff
path: root/lisp/filenotify.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2015-10-31 14:42:16 +0100
committerMichael Albinus <michael.albinus@gmx.de>2015-10-31 14:42:16 +0100
commit547a23469a20b7fa90c9a3554b8f7fb58fe100ab (patch)
tree006191be6121c65294b3fae033c4e394c165c422 /lisp/filenotify.el
parentb059c6b584e964296d425667642650f42972c238 (diff)
downloademacs-547a23469a20b7fa90c9a3554b8f7fb58fe100ab.tar.gz
Minor fix in filenotify.el
* lisp/filenotify.el (file-notify--event-file-name) (file-notify--event-file1-name): Normalize result with `directory-file-name'.
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r--lisp/filenotify.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 6a180a86570..132f1644f8f 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -100,17 +100,19 @@ It is a form ((DESCRIPTOR ACTION FILE [FILE1-OR-COOKIE]) CALLBACK).")
(defun file-notify--event-file-name (event)
"Return file name of file notification event, or nil."
- (expand-file-name
- (or (and (stringp (nth 2 event)) (nth 2 event)) "")
- (car (gethash (car event) file-notify-descriptors))))
+ (directory-file-name
+ (expand-file-name
+ (or (and (stringp (nth 2 event)) (nth 2 event)) "")
+ (car (gethash (car event) file-notify-descriptors)))))
;; Only `gfilenotify' could return two file names.
(defun file-notify--event-file1-name (event)
"Return second file name of file notification event, or nil.
This is available in case a file has been moved."
(and (stringp (nth 3 event))
- (expand-file-name
- (nth 3 event) (car (gethash (car event) file-notify-descriptors)))))
+ (directory-file-name
+ (expand-file-name
+ (nth 3 event) (car (gethash (car event) file-notify-descriptors))))))
;; Cookies are offered by `inotify' only.
(defun file-notify--event-cookie (event)