diff options
author | 2018-03-29 15:00:47 -0500 | |
---|---|---|
committer | 2018-03-29 15:00:47 -0500 | |
commit | 71f9ff71d1c54483083d6ae919b93c59f48fd167 (patch) | |
tree | 2b2ea225e8cac4b5ccaf73342a90370a4262467c /plugins/data/database.lua | |
parent | 811b159b83900b693aea764807a48afd396fb185 (diff) |
plugins/data: require returns true if package returns nil (nw)
Diffstat (limited to 'plugins/data/database.lua')
-rw-r--r-- | plugins/data/database.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/data/database.lua b/plugins/data/database.lua index 82a389c3237..c07d5165591 100644 --- a/plugins/data/database.lua +++ b/plugins/data/database.lua @@ -16,7 +16,7 @@ do db = sql.open(dbpath .. "/history.db") if not db then emu.print_error("Unable to create history.db\n") - return nil + return false end check_db("opening database") end @@ -38,4 +38,4 @@ end local dbtable = { prepare = function(...) return db:prepare(...) end, exec = function(...) return db:exec(...) end, ROW = sql.ROW, check = check_db } -return db and dbtable or nil +return db and dbtable or false |