Subject: [Boost-bugs] [Boost C++ Libraries] #4056: Problems with create_directories when path bigger than MAX_PATH
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-31 13:49:50
#4056: Problems with create_directories when path bigger than MAX_PATH
--------------------------+-------------------------------------------------
Reporter: anonymous | Owner: bemandawes
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: filesystem
Version: Boost 1.42.0 | Severity: Problem
Keywords: |
--------------------------+-------------------------------------------------
create_directories doesn't handle correctly path bigger than MAX_PATH:
if I try
boost::filesystem::wpath
path(L"c:\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=");
boost::filesystem::create_directories(path);
throws some error and it created folder structure to MAX_PATH
if I try
boost::filesystem::wpath
path(L"\\\\?\\c:\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=\\1234567890\\abcdefghijklmnopqrstuvwxyz~!@#$%^&()_+-=");
boost::filesystem::create_directories(path);
throws 3 errors (can't handle: "//?", "//?/", "//?/c:")
but the full path is created
After, I try to delete "c:\\1234567890", remove_all failed.
if I try to delete \\\\?\\"c:\\1234567890", remove_all succeeded.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4056> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC