assetFilePath issue
jschloer opened this issue · 1 comments
jschloer commented
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.