I read this in the boost docs:
Rationale: It is not considered an error for rhs to include a root-directory
because m_name might be relative or empty, and thus it is valid for rhs to
supply root-directory. For example, on Windows, the following must succeed:
path p( "c:", native );
p /= "/foo";
assert( p.string() == "c:/foo" );
So I tried the code and the first line blew up:
boost::filesystem::path: invalid name "c:" in path: "c:"
Thanks
"Ken Klose"
cout << "init path " << initial_path().string() << endl; cout << "init path exists " << exists(initial_path()) << endl;
prints:
init path C:/Documents and Settings/me/workspace/3.2/DciApiTest init path exists 1
But if I try to construct the same path from a string: I get:
path init_path2(initial_path().string(), no_check); // I've also tried 'native' checker cout << "init path 2 " << init_path2.string() << endl; cout << "init path 2 exists " << exists(init_path2) << endl;
I get:
init path 2 C:Documents and Settings/ken.klose/workspace/3.2/DciApiTest init path 2 exists 0
The / after the : gets lost and therefore the file isn't found.
Thanks in advance!
BTW: Using MinGW.