diff --git a/ice-9/ftw.scm b/ice-9/ftw.scm index 1d2ec5e93..8e050e68f 100644 --- a/ice-9/ftw.scm +++ b/ice-9/ftw.scm @@ -1,6 +1,6 @@ ;;;; ftw.scm --- filesystem tree walk -;;;; Copyright (C) 2002 Free Software Foundation, Inc. +;;;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -222,7 +222,9 @@ (let loop ((new (readdir dir-stream)) (acc '())) (if (eof-object? new) - acc + (begin + (closedir dir-stream) + acc) (loop (readdir dir-stream) (if (or (string=? "." new) ;;; ignore (string=? ".." new)) ;;; ignore