Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kenchou committed Dec 5, 2023
1 parent f83bfc6 commit ec1051f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,12 @@ fn main() -> std::io::Result<()> {

let mut operation_list: Vec<(PathBuf, String, Operation)> = vec![]; // Path, Pattern, Operation
for entry in WalkDir::new(&app_options.target_path)
.contents_first(true)
.sort_by(|a, b| {
let is_dir_a = !a.file_type().is_dir() as i8;
let is_dir_b = !b.file_type().is_dir() as i8;
let is_dir_a = a.file_type().is_dir() as i8;
let is_dir_b = b.file_type().is_dir() as i8;
is_dir_a
.cmp(&is_dir_b)
.reverse()
.then(a.file_name().cmp(&b.file_name()))
})
.into_iter()
Expand Down

0 comments on commit ec1051f

Please sign in to comment.