Skip to content

Commit 80d6283

Browse files
committed
handle the cases that scandir returns #f. fixes #2
1 parent cc837c9 commit 80d6283

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

jaro

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,12 @@
172172
(define (system-binary-list)
173173
(append-map
174174
(λ (path)
175-
(scandir path
176-
(λ (file)
177-
(let ((abspath (path-join path file)))
178-
(and (file-exists? abspath) (not (file-is-directory? abspath)))))))
179-
(string-split (getenv "PATH") #\:)))
175+
(or (scandir path
176+
(λ (file)
177+
(let ((abspath (path-join path file)))
178+
(and (file-exists? abspath) (not (file-is-directory? abspath))))))
179+
'()))
180+
(string-split (getenv "PATH") #\:)))
180181

181182
(define (read-ini-value file group key)
182183
(define current-group #f)

0 commit comments

Comments
 (0)