From 80d62837234cd3348fde15e281217fc8c5c98e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0sa=20Mert=20G=C3=BCrb=C3=BCz?= Date: Fri, 5 Jul 2019 15:54:14 +0300 Subject: [PATCH] handle the cases that scandir returns #f. fixes #2 --- jaro | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jaro b/jaro index 4c7668c..79f6bf5 100755 --- a/jaro +++ b/jaro @@ -172,11 +172,12 @@ (define (system-binary-list) (append-map (λ (path) - (scandir path - (λ (file) - (let ((abspath (path-join path file))) - (and (file-exists? abspath) (not (file-is-directory? abspath))))))) - (string-split (getenv "PATH") #\:))) + (or (scandir path + (λ (file) + (let ((abspath (path-join path file))) + (and (file-exists? abspath) (not (file-is-directory? abspath)))))) + '())) + (string-split (getenv "PATH") #\:))) (define (read-ini-value file group key) (define current-group #f)