]> git.eshelyaron.com Git - emacs.git/commitdiff
* autorevert.el (auto-revert-notify-handler): Use `file-equal-p'.
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 12 Jan 2013 19:24:27 +0000 (20:24 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 12 Jan 2013 19:24:27 +0000 (20:24 +0100)
lisp/ChangeLog
lisp/autorevert.el

index 7a8c5f2f4907cb1d73ee2bf64535e0bacbc874ce..7723528c886177d4c653ac57bf636d7e0d441a6d 100644 (file)
@@ -2,6 +2,7 @@
 
        * autorevert.el (auto-revert-notify-watch-descriptor): Give it
        `permanent-local' property.
+       (auto-revert-notify-handler): Use `file-equal-p'.
 
 2013-01-12  Eli Zaretskii  <eliz@gnu.org>
 
index 51146950a5ca7143fadbae13070169485c95d40a..c9180482cd92faf98dfea7b38726f366f4a5d431 100644 (file)
@@ -531,17 +531,14 @@ will use an up-to-date value of `auto-revert-interval'"
        (when (featurep 'inotify) (cl-assert (memq 'modify action)))
        (when (featurep 'w32notify) (cl-assert (eq 'modified action)))
        (cl-assert (bufferp buffer))
-       (when (stringp file)
-         (cl-assert (string-equal
-                     ;; w32notify returns the basename of the file
-                     ;; without its leading directories; inotify
-                     ;; returns its full absolute file name.
-                      (file-name-nondirectory (directory-file-name file))
-                      (file-name-nondirectory (directory-file-name
-                                              (buffer-file-name buffer))))))
-
-       ;; Mark buffer modified.
        (with-current-buffer buffer
+         (when (and (stringp file) (stringp buffer-file-name))
+           ;; w32notify returns the basename of the file without its
+           ;; leading directories; inotify returns its full absolute
+           ;; file name.
+           (cl-assert (file-equal-p file buffer-file-name)))
+
+         ;; Mark buffer modified.
          (setq auto-revert-notify-modified-p t))))))
 
 (defun auto-revert-active-p ()