fix: use is_dir in more places where Windows paths might be handled incorrectly

This commit is contained in:
Chris Hennick 2024-05-01 15:12:19 -07:00
parent 2eee6daea0
commit 726c7af42b
No known key found for this signature in database
GPG key ID: DA47AABA4961C509
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ fn real_main() -> i32 {
} }
} }
if (*file.name()).ends_with('/') { if file.is_dir() {
println!("File {} extracted to \"{}\"", i, outpath.display()); println!("File {} extracted to \"{}\"", i, outpath.display());
fs::create_dir_all(&outpath).unwrap(); fs::create_dir_all(&outpath).unwrap();
} else { } else {

View file

@ -34,7 +34,7 @@ fn real_main() -> i32 {
} }
} }
if (*file.name()).ends_with('/') { if file.is_dir() {
println!( println!(
"Entry {} is a directory with name \"{}\"", "Entry {} is a directory with name \"{}\"",
i, i,