abbeycode / UnzipKit

An Objective-C zlib wrapper for compressing and decompressing ZIP files
BSD 2-Clause "Simplified" License
83 stars 22 forks source link

Unhandled exception in +pathIsAZip: #99

Closed abbeycode closed 5 years ago

abbeycode commented 5 years ago

This line can throw an NSFileHandleOperationException exception, which is a documented eventuality when the file can't be read:

NSData *fileData = [handle readDataOfLength:4];

Instead of crashing, log the exception and return NO.