Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception in +pathIsAZip: #99

Closed
abbeycode opened this issue Nov 5, 2019 · 0 comments
Closed

Unhandled exception in +pathIsAZip: #99

abbeycode opened this issue Nov 5, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@abbeycode
Copy link
Owner

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.

@abbeycode abbeycode added the bug label Nov 5, 2019
@abbeycode abbeycode added this to the v1.9.1 milestone Nov 5, 2019
@abbeycode abbeycode self-assigned this Nov 5, 2019
abbeycode added a commit that referenced this issue Nov 5, 2019
abbeycode added a commit that referenced this issue Nov 5, 2019
@abbeycode abbeycode modified the milestones: v1.9.1, v2.0 Nov 5, 2019
abbeycode added a commit that referenced this issue Nov 5, 2019
abbeycode added a commit that referenced this issue Nov 5, 2019
abbeycode added a commit that referenced this issue Nov 7, 2019
Catch the exception and log it, instead of letting it propagate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant