
23 Mar
2010
23 Mar
'10
10:42 p.m.
I'm trying to use boost::filesystem::create_directories() with a path of the form \\?\Volume{Guid}\foo on windows. This seems to break the filesystem library because it doesn't understand the path syntax. when recursing up the parents it removes the slash at each level, so it ends up calling boost::filesystem::exists(L"\\?\Volume{Guid}") which always returns false, I think because GetFileAttributes() requires that paths in this syntax end with a trailing \, whereas the trailing \ has been removed. I'm tempted to fix this, but I'm sure this algorithm is fragile and any change I apply is likely to break another case. Does anyone have any suggestions on how to fix this? Thanks