diff --git a/src/read.rs b/src/read.rs index d5502932..bfc767be 100644 --- a/src/read.rs +++ b/src/read.rs @@ -702,9 +702,7 @@ impl ZipArchive { { let target_is_dir = if let Ok(meta) = std::fs::metadata(target_path) { meta.is_dir() - } else if let Some(target_in_archive) = - self.index_for_path(path_to_string(target)) - { + } else if let Some(target_in_archive) = self.index_for_name(&target) { self.by_index_raw(target_in_archive)?.is_dir() } else { false