diff options
author | Andy Wingo <wingo@pobox.com> | 2012-03-06 00:36:25 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-03-06 00:51:49 +0100 |
commit | d867c7496ce6caea7f449658306b85db3c95616c (patch) | |
tree | 96b7fa9dc80a83562f3bceddf7c37beedc05690d | |
parent | f7955da9663804812a914b17459483d376db42aa (diff) | |
download | guile-d867c7496ce6caea7f449658306b85db3c95616c.tar.gz |
slight tweak to file-exists?, file-is-directory?
* module/ice-9/boot-9.scm (file-exists?, file-is-directory?): For the
fallback cases, use open-input-file instead of open-file with
OPEN_READ.
-rw-r--r-- | module/ice-9/boot-9.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 900c25a8c..a8b771e33 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -1446,7 +1446,7 @@ VALUE." (lambda (str) (->bool (stat str #f))) (lambda (str) - (let ((port (catch 'system-error (lambda () (open-file str OPEN_READ)) + (let ((port (catch 'system-error (lambda () (open-input-file str)) (lambda args #f)))) (if port (begin (close-port port) #t) #f))))) @@ -1457,8 +1457,8 @@ VALUE." (eq? (stat:type (stat str)) 'directory)) (lambda (str) (let ((port (catch 'system-error - (lambda () (open-file (string-append str "/.") - OPEN_READ)) + (lambda () + (open-input-file (string-append str "/."))) (lambda args #f)))) (if port (begin (close-port port) #t) #f))))) |