My code looks like this:
namespace fs = boost::filesystem;
fs::path full_path(fs::initial_path());
try{
full_path = fs::system_complete(fs::path(filePath, fs::native));
...
fs::create_directories(full_path);
}catch(exception& ex){
std::cout << ex.what() << std::endl;
}
Here, 'filePath' is a const char*, that is passed in, which is of the
form "c:\\a\\b\\"
Upon execution, boost throws an exception saying 'invalid name'. If I
change all the back-slashes to slashes, the exception stating 'invalid
name' still contains "c:" as the offending string.
regs
Vivek
On 23/05/07, Server Levent Yilmaz
Hi Vivek,
On 5/23/07, Vivek Nallur
wrote: My code looks something like this:
fwiw, the following code works just fine with 1.33.1 on Windows (and you do not need to use default_name_check if don't need to do this for every path)
namespace fs = boost::filesystem; fs::path foo_path("c:\\a\\b", fs::native); fs::path bar_path(fs::initial_path());
If you can post the actual code that is causing you problems, it might help to spot the error.
Levent
-- Server Levent Yilmaz Mechanical Engineering University of Pittsburgh _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users