From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2005-09-27 16:37:40
Beman Dawes wrote:
> Have you tried the Boost.Filesystem "i18n" branch from CVS?
Nope, but I'll try and find some time to do so if you like. Trouble is, my
Win95 tester is somewhere over the internet, so I'll have to rely on his
> Assuming the reaction is favorable, the plan is to move the i18n branch
> to the CVS HEAD. Thus while I'm quite interested in your suggestions, I'd
> like to see if they apply to the i18n code rather than the 1.33 code,
> which is essentially legacy code at this point.
Right. But the fix might go in 1.33.x for some x, no?
Here's another one for you:
It seems that testing for a path "J:/foo/bar" on a Win98 or Win2000 machine
(unsure which ATM) that doesn't have a J: drive is returning true falsely
here because you ain't catching the correct error. Now, I have to say I
don't agree with this policy of JM's, but suspect that the actual error is
ERROR_INVALID_DRIVE. Will get back to you when my testers get back to me.
BOOST_FILESYSTEM_DECL bool exists( const path & ph )
if(::GetFileAttributesA( ph.string().c_str() ) == 0xFFFFFFFF)
UINT err = ::GetLastError();
if((err == ERROR_FILE_NOT_FOUND) ||
(err == ERROR_INVALID_PARAMETER) ||
(err == ERROR_PATH_NOT_FOUND) ||
(err == ERROR_INVALID_NAME))
// GetFileAttributes failed because the path does not exist
// for any other error we assume the file does exist and fall
// through, this may not be the best policy though... (JM
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk