Skip to content

Commit

Permalink
fix the unit test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Jul 3, 2024
1 parent 3899832 commit 778809b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ impl ExtractorOpts {
/// The target is the archive file name of source.
pub fn destination(&self, target: &PathBuf) -> Result<PathBuf> {
let dest = self.destination_file(target);
if dest.exists() && self.overwrite {
Ok(dest)
} else {
println!("destination: {:?}", dest);
if dest.exists() && !self.overwrite {
Err(ToteError::FileExists(dest.clone()))
} else {
Ok(dest)
}
}

Expand Down

0 comments on commit 778809b

Please sign in to comment.