mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-29 14:10:53 +00:00
Check for read-only DB
This commit is contained in:
@@ -34,6 +34,12 @@ StoreForwardPlusPlusModule::StoreForwardPlusPlusModule()
|
||||
ppDb = nullptr;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (sqlite3_db_readonly(ppDb, "main")) {
|
||||
LOG_ERROR("Database opened read-only!");
|
||||
sqlite3_close(ppDb);
|
||||
ppDb = nullptr;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
LOG_WARN("Result1 %u", res);
|
||||
|
||||
char *err = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user