diff --git a/examples/extract.rs b/examples/extract.rs index 30807162..7359b53e 100644 --- a/examples/extract.rs +++ b/examples/extract.rs @@ -30,7 +30,7 @@ fn real_main() -> i32 { } } - if (*file.name()).ends_with('/') { + if file.is_dir() { println!("File {} extracted to \"{}\"", i, outpath.display()); fs::create_dir_all(&outpath).unwrap(); } else { diff --git a/examples/file_info.rs b/examples/file_info.rs index 6a2adc58..84878c58 100644 --- a/examples/file_info.rs +++ b/examples/file_info.rs @@ -34,7 +34,7 @@ fn real_main() -> i32 { } } - if (*file.name()).ends_with('/') { + if file.is_dir() { println!( "Entry {} is a directory with name \"{}\"", i,