Skip to content

assetFilePath issue #172

@jschloer

Description

@jschloer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions