mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-06-25 07:16:41 +02:00
file-link? needs to use lstat. Fixes issue #210.
This commit is contained in:
parent
ba7518eb31
commit
96e12ad6b4
1 changed files with 3 additions and 1 deletions
|
@ -144,7 +144,9 @@
|
|||
(define (file-character? x) (file-test-mode S_ISCHR x))
|
||||
(define (file-block? x) (file-test-mode S_ISBLK x))
|
||||
(define (file-fifo? x) (file-test-mode S_ISFIFO x))
|
||||
(define (file-link? x) (file-test-mode S_ISLNK x))
|
||||
(define (file-link? x)
|
||||
(let ((st (if (stat? x) x (file-link-status x))))
|
||||
(and st (S_ISLNK (stat-mode st)))))
|
||||
(define (file-socket? x) (file-test-mode S_ISSOCK x))
|
||||
(define (file-exists? x) (and (if (stat? x) #t (file-status x)) #t))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue