changeset 20501:4ff9d9b75477

(find-file-noselect): Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Sun, 21 Dec 1997 02:34:59 +0000
parents cfb872a45411
children cd2bb777d601
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sun Dec 21 02:33:57 1997 +0000
+++ b/lisp/files.el	Sun Dec 21 02:34:59 1997 +0000
@@ -914,7 +914,8 @@
 	      (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 @@
 	    (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)))