summaryrefslogtreecommitdiff
path: root/src/lib/cross_windows.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-05-11 16:09:20 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-11 16:09:20 +0200
commit980336455724bbdb73f3fb3d521e36c71f9345e5 (patch)
tree9f90282b529952d450955736f0cfd671f3315c89 /src/lib/cross_windows.cc
parent60b80e1051c8c20ebce4b757d3fb67491dfdb79d (diff)
Don't apply the Windows long path fix twice.v2.15.147
Diffstat (limited to 'src/lib/cross_windows.cc')
-rw-r--r--src/lib/cross_windows.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc
index d97550ca9..ac92aa7eb 100644
--- a/src/lib/cross_windows.cc
+++ b/src/lib/cross_windows.cc
@@ -252,7 +252,12 @@ boost::filesystem::path
fix_long_path (boost::filesystem::path long_path)
{
using namespace boost::filesystem;
+
path fixed = "\\\\?\\";
+ if (boost::algorithm::starts_with(long_path.string(), fixed.string())) {
+ return long_path;
+ }
+
/* We have to make the path canonical but we can't call canonical() on the long path
* as it will fail. So we'll sort of do it ourselves (possibly badly).
*/