Normalize paths when printing configuration

This commit is contained in:
2022-05-14 18:42:31 +02:00
parent 664d44eddc
commit 127dd0535e
3 changed files with 27 additions and 12 deletions

View File

@@ -487,15 +487,6 @@ pub fn find_in_tree(path: &Path) -> Result<(Tree, Vec<String>), String> {
}
}
}
let home = env_home();
if root.starts_with(&home) {
// The tilde is not handled differently, it's just a normal path component for `Path`.
// Therefore we can treat it like that during **output**.
//
// The `unwrap()` is safe here as we are testing via `starts_with()`
// beforehand
root = Path::new("~").join(root.strip_prefix(&home).unwrap());
}
Ok((
Tree {