]> code.delx.au - gnu-emacs/blobdiff - lisp/files.el
(recover-file): Call auto-save-file-name-p correctly.
[gnu-emacs] / lisp / files.el
index 00cc617d927c48a00b82f57d1e18f6ba670d9abc..5673aeac8b593b4d7426854f46407ee887216d5c 100644 (file)
@@ -1822,7 +1822,8 @@ beginning and `after-revert-hook' at the end."
      (list (read-file-name "Recover file: "
                               file-dir nil nil file-name))))
   (setq file (expand-file-name file))
-  (if (auto-save-file-name-p file) (error "%s is an auto-save file" file))
+  (if (auto-save-file-name-p (file-name-nondirectory file))
+      (error "%s is an auto-save file" file))
   (let ((file-name (let ((buffer-file-name file))
                     (make-auto-save-file-name))))
     (cond ((not (file-newer-than-file-p file-name file))