Change test used to decide whether an unreadable file exists. The
authorChris Hanson <org/chris-hanson/cph>
Wed, 22 Oct 1997 01:21:11 +0000 (01:21 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 22 Oct 1997 01:21:11 +0000 (01:21 +0000)
procedure FILE-EXISTS? gives the wrong answer when the file is a
symbolic link that points to a non-existent file.

v7/src/edwin/filcom.scm

index 0f633a8a948e4ff55b2a4c6010d92a9367a20e15..22d19707304d6d9da83034d2cebe7ec8e4547d4b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: filcom.scm,v 1.192 1997/08/23 05:20:15 cph Exp $
+;;;    $Id: filcom.scm,v 1.193 1997/10/22 01:21:11 cph Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-97 Massachusetts Institute of Technology
 ;;;
@@ -169,7 +169,9 @@ invocation."
               (message "File is write protected"))
              (else
               (serious-message
-               (if (file-test-no-errors file-exists? pathname)
+               (if (file-test-no-errors
+                    (lambda (pathname) (file-access pathname 0))
+                    pathname)
                    "File exists, but is read-protected."
                    (string-append
                     "File not found and directory "