summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/autofire
diff options
context:
space:
mode:
author Szunti <Szunti@users.noreply.github.com>2021-05-04 02:40:10 +0200
committer GitHub <noreply@github.com>2021-05-03 20:40:10 -0400
commit25137717c9392d142650fcd679b09c400a2f5c4a (patch)
tree3d0f917bd4ef51a36cb45f78e3b8d33dcf375ffe /plugins/autofire
parenta90f1c885d8cbb7105cf6af2e1e2661799b5c529 (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/autofire')
-rw-r--r--plugins/autofire/autofire_save.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/autofire/autofire_save.lua b/plugins/autofire/autofire_save.lua
index 0576a95582d..3c6f177ff13 100644
--- a/plugins/autofire/autofire_save.lua
+++ b/plugins/autofire/autofire_save.lua
@@ -1,3 +1,4 @@
+local util = require("util")
local lib = {}
local function get_settings_path()
@@ -70,7 +71,7 @@ function lib:save_settings(buttons)
local path = get_settings_path()
local attr = lfs.attributes(path)
if not attr then
- lfs.mkdir(path)
+ util.mkdir_recursive(path)
elseif attr.mode ~= 'directory' then
return
end