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

Not safe to persist NSURL using absoluteString() for file URLs #99

Open
BennettSmith opened this issue Sep 15, 2014 · 1 comment
Open

Comments

@BennettSmith
Copy link

When persisting an NSURL to the database it is not safe to simply convert it to an absolute string and store it. If the NSURL is storing a file URL then the resulting string will not work to reconstruct a valid file URL. Instead, it should persist to disk as a bookmark in a BLOB. Since the field type would differ based on whether the NSURL is a file URL or not I am unsure how to fix this.

@johncblandii
Copy link

Are you saving the entire path or just the file path within the app directory?

The latter is how I'm doing it with no prob.

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

No branches or pull requests

2 participants