>From e95b208b85614b3758f49011ac708cb2a4d55de5 Mon Sep 17 00:00:00 2001 From: Mario Domenech Goulart Date: Sun, 20 Oct 2013 22:06:08 -0200 Subject: [PATCH] `##sys#find-files' bug fix: handle dot files recursively Assuming: $ mkdir -p foo/bar/.baz Old behavior: $ csi -e '(use posix) (print (find-files "foo" dotfiles: #t))' (foo/bar) Behavior with this patch: $ csi -e '(use posix) (print (find-files "foo" dotfiles: #t))' (foo/bar/.baz foo/bar) Without this patch, delete-directory doesn't properly honor the `recursive' optional argument: $ csi -e '(use posix) (delete-directory "foo" #t)' Error: (delete-directory) cannot delete directory - Directory not empty: "foo/bar" --- posix-common.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posix-common.scm b/posix-common.scm index ca3c355..3ed0f30 100644 --- a/posix-common.scm +++ b/posix-common.scm @@ -447,7 +447,7 @@ EOF ((lproc f) (loop rest (fluid-let ((depth (fx+ depth 1))) - (loop (glob (make-pathname f "*")) + (loop (glob (make-pathname f (if dot "?*" "*"))) (if (pproc f) (action f r) r)) ) ) ) (else (loop rest (if (pproc f) (action f r) r))) ) ) ((pproc f) (loop rest (action f r))) -- 1.7.10.4