summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r--plugins/cheat/init.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
index 208efc3585e..412bc261030 100644
--- a/plugins/cheat/init.lua
+++ b/plugins/cheat/init.lua
@@ -72,6 +72,7 @@ exports.license = "The BSD 3-Clause License"
exports.author = { name = "Carl" }
local cheat = exports
+local util = require("util")
function cheat.set_folder(path)
cheat.path = path
@@ -159,7 +160,7 @@ function cheat.startplugin()
local path = emu.subst_env(manager.machine.options.entries.cheatpath:value():match("([^;]+)"))
local attr = lfs.attributes(path)
if not attr then
- lfs.mkdir(path)
+ util.mkdir_recursive(path)
elseif attr.mode ~= "directory" then -- uhhh?
return
end
@@ -167,7 +168,7 @@ function cheat.startplugin()
local softpath = path .. "/" .. cheatname:match("([^/]+)")
local attr = lfs.attributes(softpath)
if not attr then
- lfs.mkdir(softpath)
+ util.mkdir_recursive(softpath)
elseif attr.mode ~= "directory" then -- uhhh?
return
end