diff options
author | 2018-03-20 21:54:22 -0500 | |
---|---|---|
committer | 2018-03-20 21:54:22 -0500 | |
commit | 31be84ea40267792f3b38ff52dfd5f75b0128a94 (patch) | |
tree | 76ec8e6368f4f70bf590394e1bc9eb563dde2d11 /plugins/data/database.lua | |
parent | 6cbf5c674bb3ee20ab89df1f839de291d02aa92b (diff) |
plugins/data: give up if the database can't be created (nw)
Diffstat (limited to 'plugins/data/database.lua')
-rw-r--r-- | plugins/data/database.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/data/database.lua b/plugins/data/database.lua index aff74c9bc87..82a389c3237 100644 --- a/plugins/data/database.lua +++ b/plugins/data/database.lua @@ -14,6 +14,10 @@ do if not db then lfs.mkdir(dbpath) db = sql.open(dbpath .. "/history.db") + if not db then + emu.print_error("Unable to create history.db\n") + return nil + end check_db("opening database") end end |