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

Use fileURLWithPath instead of string for URL init #1100

Closed
wants to merge 1 commit into from

Conversation

jeffreylyg
Copy link

@jeffreylyg jeffreylyg commented Jan 29, 2019

If use string for URL init, the disk storage is invalid because FileMeta is nil and can not get image data by Data(contentsOf: fileURL)

@jeffreylyg jeffreylyg closed this Jan 29, 2019
@jeffreylyg jeffreylyg reopened this Jan 29, 2019
@onevcat
Copy link
Owner

onevcat commented Feb 3, 2019

Hi, @jeffreylyg

Thanks for the PR. You are totally correct on the naming convention, the parameter path indeed should be a file path instead of an absolute string of a full file URL.

However, this method exists for years. And the change in this PR would be a breaking change to the current code. Instead of changing its behavior internally, I prefer to mark this method as deprecated and create a new one with correct naming and behavior inside.

How do you think about it? Would you like to send another PR for this?

@onevcat
Copy link
Owner

onevcat commented Feb 11, 2019

Related work was done in #1114

Thanks for opening this PR but I am closing it now.

@onevcat onevcat closed this Feb 11, 2019
@jeffreylyg
Copy link
Author

@onevcat I was planning to send another PR according your advice after the Spring Festival. I have missed a chance to contribute to your awesome project😂. Thanks for your fix anyway. :)

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

Successfully merging this pull request may close these issues.

2 participants