summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-03-11 11:49:10 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-03-11 12:15:16 +0200
commit221a049c5027f03ae1212ee56154473439bb5a71 (patch)
tree32191c256445789df6f10affe0d08b9c30736ddb
parent1b38c24ac6bca34e21d4ffbed6162bb939b0962a (diff)
downloadaconf-221a049c5027f03ae1212ee56154473439bb5a71.tar.bz2
aconf-221a049c5027f03ae1212ee56154473439bb5a71.tar.xz
augeas back-end: proper escaping for GC addresses
-rw-r--r--aconf/persistence/backends/augeas.lua6
1 files changed, 3 insertions, 3 deletions
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