From 221a049c5027f03ae1212ee56154473439bb5a71 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Wed, 11 Mar 2015 11:49:10 +0200 Subject: augeas back-end: proper escaping for GC addresses --- aconf/persistence/backends/augeas.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'aconf/persistence') diff --git a/aconf/persistence/backends/augeas.lua b/aconf/persistence/backends/augeas.lua index aaf3ac0..2679371 100644 --- a/aconf/persistence/backends/augeas.lua +++ b/aconf/persistence/backends/augeas.lua @@ -178,7 +178,7 @@ function backend:set(mods) local ppath, pmode = conv_path(parent) if isinstance(pmode, special.Selector) then - gc[address.join(table.unpack(array_without_last(parent)))] = false + gc[address.join('/', table.unpack(array_without_last(parent)))] = false if isinstance(pmode, special.EnumKeys) then local count = #self.aug:match(ppath) @@ -243,7 +243,7 @@ function backend:set(mods) self.aug:set(apath, value ~= nil and tostr(value) or nil) end - util.setdefault(gc, address.join(table.unpack(path)), true) + util.setdefault(gc, address.join('/', table.unpack(path)), true) end for path, _ in pairs(gc) do @@ -259,7 +259,7 @@ function backend:set(mods) break end - if gc[address.join(table.unpack(p))] ~= false then + if gc[address.join('/', table.unpack(p))] ~= false then self.aug:rm(conv_path(p)) end p[#p] = nil -- cgit v1.2.3