Skip to content

Commit 125543a

Browse files
jschloerandpor
authored andcommitted
Changes the test for ~ in the assetFilePath as the old version didn't seem to be reliable. (#173)
1 parent 9b42077 commit 125543a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ios/SQLite.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ -(id) getDBPath:(NSString *)dbFile at:(NSString *)atkey {
172172
targetBundleDirPath = [targetBundleDirPath stringByAppendingPathComponent: @"www"];
173173
assetFilePath = [targetBundleDirPath stringByAppendingPathComponent: dbfilename];
174174
RCTLog(@"Built path to pre-populated DB asset from app bundle www subdirectory: %@",assetFilePath);
175-
} else if ([assetFilePath characterAtIndex:0] == '~') {
175+
} else if ([assetFilePath hasPrefix:@"~"]) {
176176
assetFilePath = [assetFilePath substringFromIndex:1];
177177
NSString *targetBundleDirPath = [[NSBundle mainBundle] resourcePath];
178178
assetFilePath = [targetBundleDirPath stringByAppendingPathComponent: assetFilePath];

0 commit comments

Comments
 (0)