[boost::filesystem] path namecheck : want to use "native" on Windows ?

I'm using Boost on Windows and the filesystem::path behaviour seems incorrect with the default name check, so I want to use the "native" namecheck instead. First of all, is this normal ? (since Boost is compiled for windows platformn should'nt the right name check be set by default ?) I initialize it manually using : filesystem::path::default_name_check( filesystem::native ) But since it can only be done once, this throws exceptions occasionnaly (not very important, but "ugly") Is there a better way to set the name check at the start of the application ? Washburn

On 9/21/06, Washburn
I'm using Boost on Windows and the filesystem::path behaviour seems incorrect with the default name check, so I want to use the "native" namecheck instead. First of all, is this normal ? (since Boost is compiled for windows platformn should'nt the right name check be set by default ?)
The goal of the name check was to encourage people to use portable filenames. It's caused many more headaches than it solved, though, and has been removed from the tr2 proposal and the re-written Boost.Filesystem that'll be in 1.34
I initialize it manually using :
filesystem::path::default_name_check( filesystem::native )
But since it can only be done once, this throws exceptions occasionnaly (not very important, but "ugly") Is there a better way to set the name check at the start of the application ?
That's the best way I know of. At least the problem will go away once we get 1.34 =) ~ SWMc

I initialize it manually using :
filesystem::path::default_name_check( filesystem::native )
But since it can only be done once, this throws exceptions occasionnaly (not very important, but "ugly")
Specifically, what throws what exception?
Is there a better way to set the name check at the start of the application ?
I'm not sure what your doing exactly now, so it's difficult to offer advice for improvement. Jeff
participants (3)
-
Jeff F
-
me22
-
Washburn