mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-05 12:27:53 +00:00
Print paths with 2 components properly
Previously, `exa -d foo/bar` would print the file as "bar", but `exa -d foo/bar/baz` would correctly print "foo/bar/baz".
This commit is contained in:
parent
3087565c01
commit
a28bd8fa64
@ -29,7 +29,7 @@ pub fn filename(file: &File, colours: &Colours, links: bool) -> TextCellContents
|
||||
if coconut == 1 && parent.has_root() {
|
||||
bits.push(colours.symlink_path.paint("/"));
|
||||
}
|
||||
else if coconut > 1 {
|
||||
else if coconut >= 1 {
|
||||
bits.push(colours.symlink_path.paint(parent.to_string_lossy().to_string()));
|
||||
bits.push(colours.symlink_path.paint("/"));
|
||||
}
|
||||
@ -53,7 +53,7 @@ pub fn filename(file: &File, colours: &Colours, links: bool) -> TextCellContents
|
||||
if coconut == 1 && parent.has_root() {
|
||||
bits.push(colours.symlink_path.paint("/"));
|
||||
}
|
||||
else if coconut > 1 {
|
||||
else if coconut >= 1 {
|
||||
bits.push(colours.symlink_path.paint(parent.to_string_lossy().to_string()));
|
||||
bits.push(colours.symlink_path.paint("/"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user