diff options
author | 2021-05-04 02:40:10 +0200 | |
---|---|---|
committer | 2021-05-03 20:40:10 -0400 | |
commit | 25137717c9392d142650fcd679b09c400a2f5c4a (patch) | |
tree | 3d0f917bd4ef51a36cb45f78e3b8d33dcf375ffe /plugins/timer/init.lua | |
parent | a90f1c885d8cbb7105cf6af2e1e2661799b5c529 (diff) |
Create console history file in homepath (#8026)
* Fix console history path, homepath is a core option
* Create missing directories recursively in lua plugins.
* Add lfs to global environment in a less magical way.
require normally doesn't bind the name globally just returns the
module, mame sets a preloader that does bind lfs globally, but
maybe it's less surprising to do it explicitly
Diffstat (limited to 'plugins/timer/init.lua')
-rw-r--r-- | plugins/timer/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/timer/init.lua b/plugins/timer/init.lua index f0ddabbcf50..562f3c6a8b1 100644 --- a/plugins/timer/init.lua +++ b/plugins/timer/init.lua @@ -1,6 +1,6 @@ -- license:BSD-3-Clause -- copyright-holders:Carl -require('lfs') +local util = require('util') local sqlite3 = require('lsqlite3') local exports = {} exports.name = "timer" @@ -44,7 +44,7 @@ function timer.startplugin() save() end timer_started = true - lfs.mkdir(dir .. '/timer') + util.mkdir_recursive(dir .. '/timer') local db = assert(sqlite3.open(timer_db)) local found=false db:exec([[select * from sqlite_master where name='timer';]], function(...) found=true return 0 end) |