Boost logo

Boost Users :

From: Arthur Carlsson (arthur_at_[hidden])
Date: 2007-05-23 16:55:16


Set boost::filesystem::default_name_check(boost::filesystem::native); before
using path objects as boost uses posix name checking by default. This has
been changed in boost version 1.34.

On 5/23/07, Vivek Nallur <nallur_at_[hidden]> wrote:
>
> My code looks something like this:
>
> try{
> fs::path full_path (fs::initial_path());
> full_path = fs::system_complete(fs::path(filePath, fs::native));
> fs::create_directories(full_path);
> INFO << "Directory successfully created: "
> << full_path.native_directory_string() << std::endl;
> retval = true;
> }catch(std::exception& ex){
> WARN << "Could not create directory: " << filePath
> << " " << ex.what() << std::endl;
> }
> return retval;
>
> ==========
>
> When filePath is "c:\a\b\", boost throws an exception saying invalid
> path name c:\a\b\ in path "c:\a\b\"
> when filePath is "c:\\a\\b\\", boost throws exactly the same exception
> when filePath is "c:/a/b/", the exception string changes saying
> invalid path name "c:" in path "c:/a/b/"
>
> What am I doing wrong?
>
> -Vivek
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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