Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-12-08 16:58:07


At 02:30 PM 12/8/2003, Jeremy Maitin-Shepard wrote:

>I suppose it is a matter of preference; it seems that relying on these
>stored "volume serial numbers" is not a very good idea, because in
>determining if paths are equal, we want to know if the devices are the
>same. Rather than making a change though, a warning in the docs might
>be reasonable though.

I've run some more tests, hard formatting memory cards with a camera. It
assigned a volume serial number of 0.

I also ran some more floppy tests, creating floppies with duplicate files
that report equivalence when they shouldn't. However, it looks as if even
when the volume serial number and indexes are the same, ftCreationTime is
different. Thus it appears we can increase reliability by including
ftCreationTime.dwLowDateTime and ftCreationTime.dwHighDateTime in the
tests.

>...
>After a more thorough reading of the Windows API documentation, I found
>that it is necessary to specify FILE_FLAG_BACKUP_SEMANTICS in order to
>open a directory. This fixes the problem; the only catch is that it
>becomes necessary to call GetFileAttributes to determine if the path is
>a directory.
>
>I've attached a revised version, which seems to work on both file and
>directory paths.

Great! I'm working on other Boost.Filesystem changes right now, so it will
be a few days before anything else happens.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk