Boost logo

Boost :

From: David Daeschler (daveregs_at_[hidden])
Date: 2005-05-25 14:14:02


Hello,

>From my application there may come a time when I want to take a directory or
file name from a user. In windows, there is a file selection box that can
return the full path of a file that the user chooses. The full path in
windows includes the drive name with a colon and then a backslash ( c:\ ).
I can not seem to get the boost filesystem library to accept this as a valid
path even with the native checker. I also ran the test provided with boost
for paths and it failed. The output is given below.

$ bfs
Platform is Windows
initial_path().string() is
  "g:/boostfs"
initial_path().native_file_string() is
  "g:\boostfs"
d:/srcbuilds/boost_1_32_0/boost/test/minimal.hpp(129): exception
"std::exception
: boost::filesystem::path: invalid name "c:" in path: "c:/"" caught in
function:
 'int main(int, char**)'

**** Testing aborted.
**** 1 error detected

It appears that the colon is in the list of invalid characters for a file
and it is throwing things off.

My version of Boost was compiled with MinGW under Windows XP SP2 using the
command line bjam "-sTOOLS=mingw" stage

If I am missing something please let me know.

Thank you for your time,
- Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk