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:
parent
e9af43516a
commit
a44738d339
1 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;;; ftw.scm --- filesystem tree walk
|
;;;; 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
|
;;;; 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
|
;;;; it under the terms of the GNU General Public License as published by
|
||||||
|
@ -222,7 +222,9 @@
|
||||||
(let loop ((new (readdir dir-stream))
|
(let loop ((new (readdir dir-stream))
|
||||||
(acc '()))
|
(acc '()))
|
||||||
(if (eof-object? new)
|
(if (eof-object? new)
|
||||||
acc
|
(begin
|
||||||
|
(closedir dir-stream)
|
||||||
|
acc)
|
||||||
(loop (readdir dir-stream)
|
(loop (readdir dir-stream)
|
||||||
(if (or (string=? "." new) ;;; ignore
|
(if (or (string=? "." new) ;;; ignore
|
||||||
(string=? ".." new)) ;;; ignore
|
(string=? ".." new)) ;;; ignore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue