Skip to content

Commit

Permalink
Update FIRMessagingRmqManager.m
Browse files Browse the repository at this point in the history
  • Loading branch information
doganaltinbas authored May 7, 2024
1 parent b414bfc commit 20d85b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions FirebaseMessaging/Sources/FIRMessagingRmqManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,11 @@ - (void)openDatabase {
BOOL didOpenDatabase = YES;
if (![fileManager fileExistsAtPath:path]) {
// We've to separate between different versions here because of backwards compatbility issues.
int result = sqlite3_open_v2(
[path UTF8String], &self -> _database,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FILEPROTECTION_NONE, NULL);
int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
#ifdef SQLITE_OPEN_FILEPROTECTION_NONE
flags |= SQLITE_OPEN_FILEPROTECTION_NONE;
#endif
int result = sqlite3_open_v2([path UTF8String], &self -> _database, flags, NULL);
if (result != SQLITE_OK) {
NSString *errorString = FIRMessagingStringFromSQLiteResult(result);
NSString *errorMessage = [NSString
Expand Down

0 comments on commit 20d85b4

Please sign in to comment.