mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 04:52:26 -05:00
Fix: Address permissions issue for UNC paths on Windows
This commit is contained in:
parent
19bcb40059
commit
246271cbfe
1 changed files with 8 additions and 0 deletions
|
@ -1820,6 +1820,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
|
||||
|
|
Loading…
Add table
Reference in a new issue