forked from mirrors/kingfisher
fixing windows tests
This commit is contained in:
parent
14cd646ece
commit
ab6ac8943a
2 changed files with 6 additions and 3 deletions
|
|
@ -46,11 +46,14 @@ fn normalize_path(p: &Path, roots: &[PathBuf]) -> String {
|
|||
for root in roots {
|
||||
if let Ok(stripped) = p.strip_prefix(root) {
|
||||
if let Some(name) = root.file_name() {
|
||||
return PathBuf::from(name).join(stripped).to_string_lossy().into();
|
||||
return PathBuf::from(name)
|
||||
.join(stripped)
|
||||
.to_string_lossy()
|
||||
.replace('\\', "/");
|
||||
}
|
||||
}
|
||||
}
|
||||
p.to_string_lossy().into()
|
||||
p.to_string_lossy().replace('\\', "/")
|
||||
}
|
||||
|
||||
fn compute_hash(secret: &str, path: &str) -> String {
|
||||
|
|
|
|||
|
|
@ -108,4 +108,4 @@ fn baseline_exclude_prunes_entries() -> anyhow::Result<()> {
|
|||
assert!(!content.contains(".git/secret.txt"));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue