Skip to content

Commit

Permalink
Fixed crasher in +pathIsAZip: (Issue #99)
Browse files Browse the repository at this point in the history
  • Loading branch information
abbeycode committed Nov 5, 2019
1 parent e50f71d commit 7216a12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Removed methods deprecated in v1.9 (Issue #90, PR #92)
* Fixed behavior of `-extractFilesTo:overwrite:error:`, so it shows the progress of each individual file as they extract (Issue #91, PR #94)
* Deprecated the initializers that take a file path instead of an `NSURL` (Issue #90, PR #95)
* Fixed a crasher for unreadable files in `+pathIsAZip:` (Issue #99)

## 1.9

Expand Down
3 changes: 3 additions & 0 deletions Source/UZKArchive.m
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ + (BOOL)pathIsAZip:(NSString *)filePath

UZKLogDebug("File is not a ZIP. Unknown contents in 3rd and 4th bytes (%02X %02X)", dataBytes[2], dataBytes[3]);
}
@catch (NSException *e) {
URKLogError("Error checking if %{public}@ is a Zip archive: %{public}@", filePath, e);
}
@finally {
[handle closeFile];
}
Expand Down

0 comments on commit 7216a12

Please sign in to comment.