Ranges and Exception handling PR 2724
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 21 09:08:14 PST 2014
Am Fri, 21 Nov 2014 08:56:17 +0000
schrieb "Jonathan Marler" <johnnymarler at gmail.com>:
> I actually ran into this problem today when using the dirEntries
> function in std.file. I was attempting to iterate all the files
> on my C drive and I got an Access Denied error which caused the
> DirIterator to throw an exception. There's nothing I could do to
> catch the exception and continue. I'm very glad people are aware
> of this problem and I'm glad you are trying to do something about
> it.
Yep, that dirEntries Exception is quite the show stopper. You
need to be certain that you have access to all directories
that it may encounter, which makes it unusable for file system
roots, but also breaks way to easily with unreadable
directories in user directories when all you need is a list of
the _accessible_ files.
The bug reports so far:
std.file: dirEntries-range crashes, when hitting the system folder "System Volume Information"
https://issues.dlang.org/show_bug.cgi?id=12513
DirEntries throws in foreach
https://issues.dlang.org/show_bug.cgi?id=12391
dirEntries throws when encountering a "long path" on windows
https://issues.dlang.org/show_bug.cgi?id=8967
--
Marco
More information about the Digitalmars-d
mailing list