DirEntries range seems impractical with foreach

Mike Wey mike-wey at example.com
Mon Mar 17 12:19:06 PDT 2014


On 03/17/2014 02:54 PM, Ali Çehreli wrote:
> On 03/17/2014 02:18 AM, Spacen Jasset wrote:
>> While trying to use dirEntries range with foreach I encountered a
>> seemingly unsurmountable problem. The problem is that an execption is
>> thrown while calling .front()
>
> There has been past discussions on this. What version of dmd are you
> using? The following fix may have already fixed this issue. If not,
> please open another bug report:
>
>    http://d.puremagic.com/issues/show_bug.cgi?id=8298
>
> Ali

The problem is that dirEntries is trying to transverse into a directory 
for which the application doesn't have any access permission, this is a 
different issue from 8298.

But should dirEntries simply skip the directories it doesn't have access 
to, or should the user be notified somehow?

-- 
Mike Wey


More information about the Digitalmars-d-learn mailing list