mirror of
https://github.com/Llewellynvdm/exa.git
synced 2025-02-15 08:41:42 +00:00
Fix a missing '/' in symlink targets
In cases where symlink targets were more than a single directory down, exa did not print the '/' targets when separating directories, resulting in the following output: symlink => dirAdirBdirC/file Instead of symlink => dirA/dirB/dirC/file By adding a '/' character after each component of the filename, this error is fixed.
This commit is contained in:
parent
ea1b3caefa
commit
96cab9cd05
@ -162,15 +162,10 @@ impl<'a> File<'a> {
|
||||
for component in path_bytes.init().iter() {
|
||||
let string = String::from_utf8_lossy(component).to_string();
|
||||
path_prefix.push_str(&string);
|
||||
path_prefix.push_str("/");
|
||||
}
|
||||
}
|
||||
|
||||
// Only add a slash when there's something in the path
|
||||
// prefix so far.
|
||||
if path_bytes.len() > 1 {
|
||||
path_prefix.push_str("/");
|
||||
}
|
||||
|
||||
format!("{} {} {}",
|
||||
style.paint(name),
|
||||
GREY.paint("=>"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user