]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-file-noselect): Fix previous change.
authorRichard M. Stallman <rms@gnu.org>
Sun, 21 Dec 1997 02:34:59 +0000 (02:34 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 21 Dec 1997 02:34:59 +0000 (02:34 +0000)
lisp/files.el

index 41f3c2d237ef2283ca8a1d657a4eb09df40d67b6..4d977185d268d9d7008915814c396845be7d9bea 100644 (file)
@@ -914,7 +914,8 @@ Optional second arg RAWFILE non-nil means the file is read literally."
              (condition-case ()
                  (insert-file-contents-literally filename t)
                (file-error
-                (when (not (file-readable-p filename))
+                (when (and (file-exists-p filename)
+                           (not (file-readable-p filename)))
                   (kill-buffer buf)
                   (signal 'file-error (list "File is not readable"
                                             filename)))
@@ -923,7 +924,8 @@ Optional second arg RAWFILE non-nil means the file is read literally."
            (condition-case ()
                (insert-file-contents filename t)
              (file-error
-              (when (not (file-readable-p filename))
+              (when (and (file-exists-p filename)
+                         (not (file-readable-p filename)))
                 (kill-buffer buf)
                 (signal 'file-error (list "File is not readable"
                                           filename)))