Skip to content

Commit

Permalink
Add 2nd directory
Browse files Browse the repository at this point in the history
On Linux, components[0] is just '/',
so it might be better to also add components[1].
  • Loading branch information
Herbie34 committed Oct 11, 2024
1 parent 37fb766 commit d22ea4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ impl std::fmt::Display for Location {
if 3 < len {
let mut omitted_path = path::PathBuf::new();
omitted_path.push(components[0]);
omitted_path.push(components[1]);
omitted_path.push("...");
omitted_path.push(components[len - 1]);
loc = omitted_path.to_string_lossy().to_string();
Expand Down

0 comments on commit d22ea4f

Please sign in to comment.