1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00
This commit is contained in:
Yazan AbdAl-Rahman 2025-01-20 18:36:55 -06:00 committed by GitHub
commit 60dee317f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2884,6 +2884,14 @@ impl PermissionsContainer {
fn is_normalized_windows_drive_path(path: &Path) -> bool {
let s = path.as_os_str().as_encoded_bytes();
// Check if the path is a UNC path (e.g., \\Server\Share\Folder)
// UNC paths typically contain "\\" at the start or somewhere in the middle
if s.windows(2).any(|window| window == b"\\\\") {
return true;
}
// Original check for normalized drive paths (e.g., \\?\C:\)
// \\?\X:\
if s.len() < 7 {
false