From 96cab9cd059e40d1532a227f6b21db6a5f6eb9e2 Mon Sep 17 00:00:00 2001 From: Jonny Gilchrist Date: Tue, 24 Feb 2015 03:28:34 +0000 Subject: [PATCH] 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. --- src/file.rs | 7 +------ 1 file changed, 1 insertion(+), 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("=>"),