aboutsummaryrefslogtreecommitdiff
path: root/src/database.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.cc')
-rw-r--r--src/database.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/database.cc b/src/database.cc
index 104224d..4b06386 100644
--- a/src/database.cc
+++ b/src/database.cc
@@ -2410,6 +2410,14 @@ bool InitDatabase(void){
return false;
}
+ if(sqlite3_db_readonly(g_Database, NULL)){
+ LOG_ERR("Failed to open database file \"%s\" with WRITE PERMISSIONS."
+ " Make sure the file has the appropriate permissions and is"
+ " owned by the same user running the query manager.",
+ g_DatabaseFile);
+ return false;
+ }
+
if(!InitStatementCache()){
LOG_ERR("Failed to initialize statement cache");
return false;