diff options
author | garret <garret@airmail.cc> | 2022-11-24 00:16:48 +0000 |
---|---|---|
committer | garret <garret@airmail.cc> | 2022-11-24 00:19:32 +0000 |
commit | c3454654c5389d6e3b6e8c2c98100c1a41b8d1b9 (patch) | |
tree | 4dc3949025db011a6dd0cc12f73122f0d00e040c /macros/garret.depctrl_config.lua | |
parent | 2d90b8e6dfa3c41e1b70d61c03d65e3f127f4243 (diff) | |
download | aegisub-scripts-c3454654c5389d6e3b6e8c2c98100c1a41b8d1b9.tar.gz aegisub-scripts-c3454654c5389d6e3b6e8c2c98100c1a41b8d1b9.tar.bz2 aegisub-scripts-c3454654c5389d6e3b6e8c2c98100c1a41b8d1b9.zip |
depctrl global config: only pass config to functions instead of whole file
Diffstat (limited to 'macros/garret.depctrl_config.lua')
-rw-r--r-- | macros/garret.depctrl_config.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/macros/garret.depctrl_config.lua b/macros/garret.depctrl_config.lua index 5d038c0..bda4a28 100644 --- a/macros/garret.depctrl_config.lua +++ b/macros/garret.depctrl_config.lua @@ -62,8 +62,7 @@ local function get_human_filesize(bytes) return bytes end -local function get_config(data) - local config = data.config +local function get_config(config) local defaults = {updaterEnabled = true, updateInterval = 302400, traceLevel = 3, extraFeeds = { }, tryAllFeeds = false, dumpFeeds = true, configDir = "?user/config", logMaxFiles = 200, logMaxAge = 604800, logMaxSize = 10 * (10 ^ 6), updateWaitTimeout = 60, updateOrphanTimeout = 600, logDir = "?user/log", writeLogs = true} local dialog = { { class="checkbox", name="updaterEnabled", @@ -178,7 +177,7 @@ end local function change_config(new) -- i think i might be thinning out the soup a bit too much local config_path = get_config_path() local data = read_json(config_path) - data.config = new(data) + data.config = new(data.config) write_json(config_path, data) end |