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

assetFilePath issue #172

Closed
jschloer opened this issue Jun 14, 2017 · 1 comment
Closed

assetFilePath issue #172

jschloer opened this issue Jun 14, 2017 · 1 comment

Comments

@jschloer
Copy link
Contributor

jschloer commented Jun 14, 2017

I'm having trouble with the assetFilePath. When setting the createFromLocation path to '/filePath', react native sqlite storage is treating it like an asset bundle path. It looks like the issue is in /src/ios/SQLite.m line 175:

            } else if ([assetFilePath characterAtIndex:0 == '~']) {

If I'm reading this right, instead of checking for a ~ character at index 0, we're checking for a character at (0=='~') which should be false/0. So I think we're essentially just saying if there is a non-zero character at position 0. I believe this was meant to be:

            } else if ([assetFilePath characterAtIndex:0] == '~') {

Though I would suggest changing to:

            } else if ([assetFilePath hasPrefix:@"~"]) {

I will submit a PR for this change now.

@andpor
Copy link
Owner

andpor commented Aug 1, 2017

@jschloer - thanks for this . this certainly looks like a typo bug. I think you are correct but I will double check this...

@andpor andpor closed this as completed Aug 2, 2017
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