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

Fix crash when fileURLWithPath: paragram = nil #372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wenluma
Copy link

@wenluma wenluma commented Aug 18, 2017

提出 Pull Request 前请先确认完成了下列几项步骤 New Pull Request Checklist

  • 我已经阅读过 贡献指南 I have read and understood the CONTRIBUTING guide
  • 我已经阅读过 程序文档 I have read the Documentation
  • 我已经在项目的 Pull Request 列表 中搜索过并且没有找到类似的 Pull Request I have searched for a similar pull request in the project and found none
  • 我已经添加了必要的测试以证明我的改动是正确的 I have added the required tests to prove the fix/feature I am adding
  • 我已经更新了有关文档(如必要)I have updated the documentation (if necesarry)

Pull Request 说明 Pull Request Description

这个 Pull Request 解决了如下问题/加入了如下功能:···

This pull request fixes / reffers to the following issues: ...

@wenluma
Copy link
Author

wenluma commented Aug 18, 2017

Fix crash when fileURLWithPath: paragram = nil

@skyline75489
Copy link
Contributor

I'd prefer NSParameterAssert

@wenluma
Copy link
Author

wenluma commented Aug 21, 2017

tempPath = [[self incompleteDownloadTempCacheFolder] stringByAppendingPathComponent:md5URLString];
tempPath maybe nil, then crash

@skyline75489
Copy link
Contributor

When would tempPath be nil?

@wenluma
Copy link
Author

wenluma commented Sep 14, 2017

if(![fileManager createDirectoryAtPath:cacheFolder withIntermediateDirectories:YES attributes:nil error:&error])
'incompleteDownloadTempCacheFolder' maybe nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants