Skip to content

Fix crash when fileURLWithPath: paragram = nil#372

Open
wenluma wants to merge 2 commits into
kanyun-inc:masterfrom
wenluma:master
Open

Fix crash when fileURLWithPath: paragram = nil#372
wenluma wants to merge 2 commits into
kanyun-inc:masterfrom
wenluma:master

Conversation

@wenluma

@wenluma wenluma commented Aug 18, 2017

Copy link
Copy Markdown

提出 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

wenluma commented Aug 18, 2017

Copy link
Copy Markdown
Author

Fix crash when fileURLWithPath: paragram = nil

@skyline75489

Copy link
Copy Markdown
Contributor

I'd prefer NSParameterAssert

@wenluma

wenluma commented Aug 21, 2017

Copy link
Copy Markdown
Author

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

@skyline75489

Copy link
Copy Markdown
Contributor

When would tempPath be nil?

@wenluma

wenluma commented Sep 14, 2017

Copy link
Copy Markdown
Author

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