aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/main.rs9
1 files changed, 8 insertions, 1 deletions
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));
+ }
}