diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 894c95e..e15d6ae 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -1563,7 +1563,7 @@ const AUDITED_UNSAFE_SOURCE_FILES: &[&str] = &[ ]; fn is_audited_unsafe_source(path: &Path) -> bool { - let as_path = path.as_os_str().to_string_lossy(); + let as_path = path.as_os_str().to_string_lossy().replace('\\', "/"); AUDITED_UNSAFE_SOURCE_FILES .iter() .any(|candidate| as_path.ends_with(candidate)) @@ -3739,4 +3739,11 @@ source = "git+https://example.invalid/repo" )] ); } + + #[test] + fn audited_unsafe_allowlist_accepts_windows_separators() { + let path = Path::new(r".\adapters\fparkan-render-vulkan\src\ffi\runtime.rs"); + + assert!(is_audited_unsafe_source(path)); + } }