Skip to content

Commit

Permalink
Rm unnecessary p.exist() check in ZipStreamReader::extract
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu authored and Plecra committed Feb 1, 2023
1 parent 5b6d955 commit 8f7c43c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/read/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ impl<R: Read> ZipStreamReader<R> {
fs::create_dir_all(&outpath)?;
} else {
if let Some(p) = outpath.parent() {
if !p.exists() {
fs::create_dir_all(&p)?;
}
fs::create_dir_all(&p)?;
}
let mut outfile = fs::File::create(&outpath)?;
io::copy(file, &mut outfile)?;
Expand Down

0 comments on commit 8f7c43c

Please sign in to comment.