From b81519a7676f43fc26b2287b2d033711c22e4e99 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 20 May 2013 19:43:03 -0500 Subject: [PATCH] path_is_root_of_drive(): Recognize \\?\-prefixed paths as being drive root --- src/win32_apply.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/win32_apply.c b/src/win32_apply.c index 7b7ff27b..11104f24 100644 --- a/src/win32_apply.c +++ b/src/win32_apply.c @@ -482,9 +482,12 @@ do_win32_extract_encrypted_stream(const wchar_t *path, static bool path_is_root_of_drive(const wchar_t *path) { - if (!*path) + if (*path == L'\0') return false; + if (!wcsncmp(path, L"\\\\?\\", 4)) + path += 4; + if (*path != L'/' && *path != L'\\') { if (*(path + 1) == L':') path += 2; -- 2.43.0