diff options
author | Jonny Gilchrist <jonnygilchrist@gmail.com> | 2015-02-24 03:28:34 +0000 |
---|---|---|
committer | Jonny Gilchrist <jonnygilchrist@gmail.com> | 2015-02-24 03:28:34 +0000 |
commit | 96cab9cd059e40d1532a227f6b21db6a5f6eb9e2 (patch) | |
tree | acf95701afdbbb8886cf8371ce3033d5788359f5 /src/file.rs | |
parent | ea1b3caefad39b7f794cd99112600528eb237d15 (diff) |
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.
Diffstat (limited to 'src/file.rs')
-rw-r--r-- | src/file.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/file.rs b/src/file.rs index 18f93ce..3dc50df 100644 --- a/src/file.rs +++ b/src/file.rs @@ -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("=>"), |