diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2015-02-09 19:44:12 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2015-02-12 16:32:41 +0200 |
commit | 29282b5a7d43e8b5ce12b0ec4b7a7620c19a67b6 (patch) | |
tree | a8ad7d5343c41950ff9c8f96a55f41a80271f72a /aconf/persistence/backends/files.lua | |
parent | 07a0eb180872401b271de40190603df8f3ab3db2 (diff) | |
download | aconf-29282b5a7d43e8b5ce12b0ec4b7a7620c19a67b6.tar.bz2 aconf-29282b5a7d43e8b5ce12b0ec4b7a7620c19a67b6.tar.xz |
proper escaping for back-end addresses
Diffstat (limited to 'aconf/persistence/backends/files.lua')
-rw-r--r-- | aconf/persistence/backends/files.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/aconf/persistence/backends/files.lua b/aconf/persistence/backends/files.lua index 1c78c80..427d8bb 100644 --- a/aconf/persistence/backends/files.lua +++ b/aconf/persistence/backends/files.lua @@ -1,10 +1,11 @@ --[[ -Copyright (c) 2012-2014 Kaarle Ritvanen +Copyright (c) 2012-2015 Kaarle Ritvanen See LICENSE file for license details --]] local topology = require('aconf.model.root').topology local pth = require('aconf.path') +local address = require('aconf.path.address') local util = require('aconf.persistence.util') local copy = require('aconf.util').copy @@ -29,7 +30,7 @@ local backend = require('aconf.object').class() function backend:init() self.cache = {} end function backend:get(path, top) - local name = pth.join('/', table.unpack(path)) + local name = address.join('/', table.unpack(path)) if not self.cache[name] then local t = posix.stat(name, 'type') @@ -69,7 +70,7 @@ end function backend:set(mods) for _, mod in pairs(mods) do local path, value = table.unpack(mod) - local name = pth.join('/', table.unpack(path)) + local name = address.join('/', table.unpack(path)) if value == nil then print('DEL', name) |