Fix #7239, Stack overflow when calling create_directories(":D"). The reported problem was a symptom of an internal bug that caused path::filename() and path::parent_path() to fail on Windows for path(":"), and that in turn caused other functions that depend on filename() or parent_path() to fail, such as create_directories().

[SVN r80279]
This commit is contained in:
Beman Dawes
2012-08-28 12:57:02 +00:00
parent 6f223a28ed
commit 08c11663d9
4 changed files with 34 additions and 2 deletions

View File

@@ -510,7 +510,7 @@ namespace
size_type pos(str.find_last_of(separators, end_pos-1));
# ifdef BOOST_WINDOWS_API
if (pos == string_type::npos)
if (pos == string_type::npos && end_pos > 1)
pos = str.find_last_of(colon, end_pos-2);
# endif