From 809d680df91d492539126af9da0d5206fe350f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Sch=C3=BCmann?= Date: Tue, 10 Nov 2020 08:34:21 +0100 Subject: [PATCH] refs #75, avoid messing with long namespaced path on windows --- include/ghc/filesystem.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ghc/filesystem.hpp b/include/ghc/filesystem.hpp index 82f6d84..d371bc0 100644 --- a/include/ghc/filesystem.hpp +++ b/include/ghc/filesystem.hpp @@ -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 {