mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
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.
This commit is contained in:
parent
f7955da966
commit
d867c7496c
1 changed files with 3 additions and 3 deletions
|
@ -1446,7 +1446,7 @@ VALUE."
|
||||||
(lambda (str)
|
(lambda (str)
|
||||||
(->bool (stat str #f)))
|
(->bool (stat str #f)))
|
||||||
(lambda (str)
|
(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))))
|
(lambda args #f))))
|
||||||
(if port (begin (close-port port) #t)
|
(if port (begin (close-port port) #t)
|
||||||
#f)))))
|
#f)))))
|
||||||
|
@ -1457,8 +1457,8 @@ VALUE."
|
||||||
(eq? (stat:type (stat str)) 'directory))
|
(eq? (stat:type (stat str)) 'directory))
|
||||||
(lambda (str)
|
(lambda (str)
|
||||||
(let ((port (catch 'system-error
|
(let ((port (catch 'system-error
|
||||||
(lambda () (open-file (string-append str "/.")
|
(lambda ()
|
||||||
OPEN_READ))
|
(open-input-file (string-append str "/.")))
|
||||||
(lambda args #f))))
|
(lambda args #f))))
|
||||||
(if port (begin (close-port port) #t)
|
(if port (begin (close-port port) #t)
|
||||||
#f)))))
|
#f)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue