mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 04:52:26 -05:00
Merge b9b7163c46
into 0d3d4f5466
This commit is contained in:
commit
60dee317f3
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue