1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-15 16:20:17 +02:00

(directory-files): Close dir-stream when done. Thanks to Paul Jarc!

This commit is contained in:
Marius Vollmer 2003-10-12 16:55:17 +00:00
parent e9af43516a
commit a44738d339

View file

@ -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