File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -279,7 +279,10 @@ - (void)openDatabase:(NSString *)dbName {
279279 BOOL didOpenDatabase = YES ;
280280 if (![fileManager fileExistsAtPath: path]) {
281281 // We've to separate between different versions here because of backwards compatbility issues.
282- int result = sqlite3_open ([path UTF8String ], &_database);
282+ int result = sqlite3_open_v2 ([path UTF8String ],
283+ &_database,
284+ SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FILEPROTECTION_NONE,
285+ NULL );
283286 if (result != SQLITE_OK) {
284287 NSString *errorString = FIRMessagingStringFromSQLiteResult (result);
285288 NSString *errorMessage =
@@ -299,7 +302,10 @@ - (void)openDatabase:(NSString *)dbName {
299302 [self createTableWithName: kTableS2DRmqIds command: kCreateTableS2DRmqIds ];
300303 } else {
301304 // Calling sqlite3_open should create the database, since the file doesn't exist.
302- int result = sqlite3_open ([path UTF8String ], &_database);
305+ int result = sqlite3_open_v2 ([path UTF8String ],
306+ &_database,
307+ SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FILEPROTECTION_NONE,
308+ NULL );
303309 if (result != SQLITE_OK) {
304310 NSString *errorString = FIRMessagingStringFromSQLiteResult (result);
305311 NSString *errorMessage =
You can’t perform that action at this time.
0 commit comments