diff --git a/runtime/permissions/lib.rs b/runtime/permissions/lib.rs index 3a357d2d44..641e0ded69 100644 --- a/runtime/permissions/lib.rs +++ b/runtime/permissions/lib.rs @@ -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