From fe80e56db9f3d40852fd3d9385c0b8bf67bf7398 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sun, 9 Mar 2014 20:09:06 +0900 Subject: [PATCH] Exporting file-link-status. Fixing a bug in directory-fold-tree, down should be called exactly once per directory with a matching up. --- lib/chibi/filesystem.scm | 4 ++-- lib/chibi/filesystem.sld | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/chibi/filesystem.scm b/lib/chibi/filesystem.scm index aabb1742..f596bb2f 100644 --- a/lib/chibi/filesystem.scm +++ b/lib/chibi/filesystem.scm @@ -55,7 +55,7 @@ (let ((d (opendir file))) (if (not d) acc - (let lp ((acc acc)) + (let lp ((acc (down file acc))) (let ((e (readdir d))) (cond (e @@ -63,7 +63,7 @@ (if (member f '("." "..")) (lp acc) (let ((path (string-append file "/" f))) - (lp (fold path (down path acc))))))) + (lp (fold path acc)))))) (else (closedir d) (up file acc)))))))) diff --git a/lib/chibi/filesystem.sld b/lib/chibi/filesystem.sld index c93642d5..c660f0a3 100644 --- a/lib/chibi/filesystem.sld +++ b/lib/chibi/filesystem.sld @@ -14,7 +14,7 @@ create-directory create-directory* current-directory change-directory with-directory open open-pipe make-fifo - file-status + file-status file-link-status file-device file-inode file-mode file-num-links file-owner file-group