diff options
Diffstat (limited to 'aconf/persistence/backends/augeas.lua')
-rw-r--r-- | aconf/persistence/backends/augeas.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/aconf/persistence/backends/augeas.lua b/aconf/persistence/backends/augeas.lua index a448e65..7ffccb9 100644 --- a/aconf/persistence/backends/augeas.lua +++ b/aconf/persistence/backends/augeas.lua @@ -161,7 +161,7 @@ function backend:set(mods) local gc = {} for _, mod in ipairs(mods) do - local path, value = unpack(mod) + local path, value = table.unpack(mod) local function insert(path, new) local apath, mode, keys = conv_path(path) @@ -173,7 +173,7 @@ function backend:set(mods) local ppath, pmode = conv_path(parent) if pmode then - gc[pth.join(unpack(array_without_last(parent)))] = false + gc[pth.join(table.unpack(array_without_last(parent)))] = false end if pmode == '#' then @@ -239,7 +239,7 @@ function backend:set(mods) self.aug:set(apath, value ~= nil and tostr(value) or nil) end - util.setdefault(gc, pth.join(unpack(path)), true) + util.setdefault(gc, pth.join(table.unpack(path)), true) end for path, _ in pairs(gc) do @@ -255,7 +255,9 @@ function backend:set(mods) break end - if gc[pth.join(unpack(p))] ~= false then self.aug:rm(conv_path(p)) end + if gc[pth.join(table.unpack(p))] ~= false then + self.aug:rm(conv_path(p)) + end p[#p] = nil end end |