Skip to content

Commit

Permalink
Fix logic error in checksum validation codepath
Browse files Browse the repository at this point in the history
  • Loading branch information
weichsel committed Sep 20, 2022
1 parent ef57469 commit f6a22e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/ZIPFoundation/FileManager+ZIP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ extension FileManager {
}

func verifyChecksumIfNecessary() throws {
guard skipCRC32 == false, crc32 == entry.checksum
else {
if skipCRC32 == false, crc32 != entry.checksum {
throw Archive.ArchiveError.invalidCRC32
}
}
Expand Down

0 comments on commit f6a22e7

Please sign in to comment.