summaryrefslogtreecommitdiffstatshomepage
path: root/plugins
diff options
context:
space:
mode:
author kunikuni <42865216+kunikunijp@users.noreply.github.com>2020-07-19 22:05:00 +0900
committer GitHub <noreply@github.com>2020-07-19 23:05:00 +1000
commit070eeeec3a500d0a73293e8b488613df89392548 (patch)
treefb28f1d6c15440dbe56f8a52bbfa39a7c5382f07 /plugins
parent3e36d3646b02af164d27152cb7fd2ba2a1ffd3a0 (diff)
plugins/autofire: don't save 2bytes cfg file (nw) (#6969)
* plugins/autofire: don't save 2bytes cfg file (nw) * Update autofire_save.lua
Diffstat (limited to 'plugins')
-rw-r--r--plugins/autofire/autofire_save.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/autofire/autofire_save.lua b/plugins/autofire/autofire_save.lua
index 9aae0f9e418..6a30438bfd9 100644
--- a/plugins/autofire/autofire_save.lua
+++ b/plugins/autofire/autofire_save.lua
@@ -74,6 +74,10 @@ function lib:save_settings(buttons)
elseif attr.mode ~= 'directory' then
return
end
+ if #buttons == 0 then
+ os.remove(path .. get_settings_filename())
+ return
+ end
local json = require('json')
local settings = serialize_settings(buttons)
local data = json.stringify(settings, {indent = true})