File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -206,9 +206,11 @@ pub async fn unzip<R: tokio::io::AsyncRead + Unpin>(
206
206
207
207
// Verify that the existing file contents match the expected contents.
208
208
if existing_contents != expected_contents {
209
- return Err ( Error :: DuplicateLocalFileHeader {
210
- path : relpath. clone ( ) ,
211
- } ) ;
209
+ if !skip_validation {
210
+ return Err ( Error :: DuplicateLocalFileHeader {
211
+ path : relpath. clone ( ) ,
212
+ } ) ;
213
+ }
212
214
}
213
215
214
216
( bytes_read as u64 , entry_reader)
@@ -455,9 +457,11 @@ pub async fn unzip<R: tokio::io::AsyncRead + Unpin>(
455
457
}
456
458
std:: collections:: hash_map:: Entry :: Occupied ( entry) => {
457
459
if mode != * entry. get ( ) {
458
- return Err ( Error :: DuplicateExecutableFileHeader {
459
- path : relpath. clone ( ) ,
460
- } ) ;
460
+ if !skip_validation {
461
+ return Err ( Error :: DuplicateExecutableFileHeader {
462
+ path : relpath. clone ( ) ,
463
+ } ) ;
464
+ }
461
465
}
462
466
}
463
467
}
You can’t perform that action at this time.
0 commit comments