-static bool
-path_is_root_of_drive(const wchar_t *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;
- else
- return false;
- }
- while (*path == L'/' || *path == L'\\')
- path++;
- return (*path == L'\0');
-}
-