summaryrefslogtreecommitdiffstats
path: root/acf/persistence/backends/json.lua
diff options
context:
space:
mode:
Diffstat (limited to 'acf/persistence/backends/json.lua')
-rw-r--r--acf/persistence/backends/json.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/acf/persistence/backends/json.lua b/acf/persistence/backends/json.lua
index 65fc987..d2e6196 100644
--- a/acf/persistence/backends/json.lua
+++ b/acf/persistence/backends/json.lua
@@ -51,21 +51,21 @@ function backend:split_path(path)
end
end
-function backend:get(path, tpe)
+function backend:get(path, top)
local fpath, jpath = self:split_path(path)
if not self.cache[fpath] then
self.cache[fpath] = Cache(json.decode(util.read_file(fpath)))
end
- return self.cache[fpath]:get(jpath, tpe)
+ return self.cache[fpath]:get(jpath, top)
end
function backend:set(mods)
local dirty = {}
for _, mod in ipairs(mods) do
- local path, tpe, value = unpack(mod)
+ local path, value = unpack(mod)
local fpath, jpath = self:split_path(path)
- self.cache[fpath]:_set(jpath, tpe, value)
+ self.cache[fpath]:_set(jpath, value)
dirty[fpath] = true
end