
On Wed, Mar 24, 2010 at 12:42 AM, Zachary Turner <divisortheory@gmail.com>wrote:
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 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
That's right. With this simple test: char volPath[MAX_PATH] = {0}; char *volMount = "C:\\"; GetVolumeNameForVolumeMountPointA(volMount, volPath, MAX_PATH); strcat(volPath, "foo\\"); fs::create_directories(volPath); , it fails, because, when checking the parent dir, it removes the trailing \. Also, this is related to https://svn.boost.org/trac/boost/ticket/2138 Ilie.