Boost logo

Boost Users :

From: Vivek Nallur (nallur_at_[hidden])
Date: 2007-05-24 18:42:44


Funnily enough,

full_path = fs::system_complete(fs::path(filePath, fs::no_check));

works on my windows machine!

-Vivek

On 23/05/07, Vivek Nallur <nallur_at_[hidden]> wrote:
> 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 <leventyilmaz_at_[hidden]> wrote:
> > Hi Vivek,
> >
> > On 5/23/07, Vivek Nallur <nallur_at_[hidden]> 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_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