Boost logo

Boost Users :

Subject: [Boost-users] [Filesystem] directory iteration throws
From: gast128 (gast128_at_[hidden])
Date: 2010-01-06 11:24:50


Hello all,

I was writing a simple application to enumerate files sorted on their size. I
used the recursive_directory_iterator for this task. However on my Windows XP
machine the directory iteration stops because of a throwing constructor.

It is easy reproducable, by creating a directory with contents and remove all
security attributes (except for the system account, leave there all
permissions enabled) and use that directory for iteration, i.e. my c:\temp\bla
directory contained 1 file and I removed the security attributes for the
directory Bla.

Tracing thru the source code of Boost.FileSystem the directory is opened with
a '::FindFirstFileA' call which returns an 'INVALID_HANDLE_VALUE', resulting
in a throw. This stops further iteration of the directory.

Is there a way to work around this?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net