refs #75, avoid messing with long namespaced path on windows

This commit is contained in:
Steffen Schümann 2020-11-10 08:34:21 +01:00
parent b3f9635581
commit 809d680df9

View File

@ -2549,8 +2549,8 @@ GHC_INLINE path::impl_string_type path::native_impl() const
{
impl_string_type result;
if (is_absolute() && _path.length() > MAX_PATH - 10) {
// expand long Windows filenames with marker
if (has_root_name() && _path[0] == '/') {
// expand absolute non namespaced long Windows filenames with marker
if (has_root_name() && _path[0] == '/' && _path[1] != '/') {
result = "\\\\?\\" + _path.substr(1);
}
else {