path_is_root_of_drive(): Recognize \\?\-prefixed paths as being drive root
authorEric Biggers <ebiggers3@gmail.com>
Tue, 21 May 2013 00:43:03 +0000 (19:43 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 21 May 2013 00:43:03 +0000 (19:43 -0500)
src/win32_apply.c

index 7b7ff27..11104f2 100644 (file)
@@ -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;