summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/win32/filesystem_win32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/win32/filesystem_win32.c b/src/win32/filesystem_win32.c
index 3e9b7a6..b37f7bf 100644
--- a/src/win32/filesystem_win32.c
+++ b/src/win32/filesystem_win32.c
@@ -202,6 +202,11 @@ zix_canonical_path(ZixAllocator* const allocator, const char* const path)
return NULL;
}
+ if (final_size > 4U && !strncmp(final, "\\\\?\\", 4)) {
+ memmove(final, final + 4U, final_size - 4U);
+ final[final_size - 4U] = '\0';
+ }
+
CloseHandle(h);
return final;
}