From a44738d33901432823d5d38a29c5ad95d601d520 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sun, 12 Oct 2003 16:55:17 +0000 Subject: [PATCH] (directory-files): Close dir-stream when done. Thanks to Paul Jarc! --- ice-9/ftw.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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