resolves base path in tests
Ensure symlinks are handled because `/var/` points to `/private/var/`.
This commit is contained in:
parent
d7f158a4bd
commit
e7580d1cec
1 changed files with 5 additions and 1 deletions
|
|
@ -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('\\', "/")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue