Skip to content

Commit

Permalink
improve subdir print
Browse files Browse the repository at this point in the history
  • Loading branch information
Esgrove committed Apr 29, 2024
1 parent ffc1b92 commit d86740a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions src/renamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,11 @@ impl Renamer {
if !self.config.sort_files {
// Print current directory when iterating in directory order
if current_path != track.root {
let path = match current_path.strip_prefix(&self.root) {
Ok(relative_path) => format!("{}", relative_path.display()),
Err(_) => format!("{}", current_path.display()),
};
current_path = track.root.clone();
let path = utils::path_to_string_relative(&current_path);
if !path.is_empty() {
println!("\n{}", path.magenta());
}
current_path = track.root.clone();
}
}

Expand Down

0 comments on commit d86740a

Please sign in to comment.