Commit Graph

1 Commits

Author SHA1 Message Date
Peter Wang
5982c44df9 Fix resource leaks in dir fold predicates.
The directory stream was not closed if dir.open succeeded in opening
the directory, but failing to read the first entry (which may be as
simple as an empty directory).

The directory stream was also not closed when dir.foldl2_process_dir2
returns an error value.

library/dir.m:
	As above.

tests/hard_coded/Mmakefile:
tests/hard_coded/dir_fold.exp:
tests/hard_coded/dir_fold.m:
	Add regression test.

NEWS:
	Announce change.
2014-05-19 14:52:30 +10:00