resolves base path in tests

Ensure symlinks are handled because `/var/` points to `/private/var/`.
This commit is contained in:
Robin Malfait 2024-10-25 18:53:24 +02:00 • committed by Jordan Pittman
parent d7f158a4bd
commit e7580d1cec

View file

@ -69,7 +69,11 @@ mod scanner {
paths = paths
.into_iter()
.map(|x| {
let parent_dir = format!("{}{}", &base.to_string(), path::MAIN_SEPARATOR);
let parent_dir = format!(
"{}{}",
fs::canonicalize(&base).unwrap().display(),
path::MAIN_SEPARATOR
);
x.replace(&parent_dir, "")
// Normalize paths to use unix style separators
.replace('\\', "/")