summaryrefslogtreecommitdiffstats
path: root/acf/persistence/backends/files.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-05-01 11:44:11 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-05-01 14:11:00 +0300
commitb5cf596d6c17fc9c8b7c679fe445a9c70af2a16e (patch)
treeaa649c1ff98961f1b6bbc1fef983a8ee9adc1c07 /acf/persistence/backends/files.lua
parent8a1ecf4ef917a47119c269f3adcf78cf082e0e55 (diff)
downloadaconf-b5cf596d6c17fc9c8b7c679fe445a9c70af2a16e.tar.bz2
aconf-b5cf596d6c17fc9c8b7c679fe445a9c70af2a16e.tar.xz
allow numerical components in path names
use escape syntax to encode number-looking strings
Diffstat (limited to 'acf/persistence/backends/files.lua')
-rw-r--r--acf/persistence/backends/files.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/acf/persistence/backends/files.lua b/acf/persistence/backends/files.lua
index 03eadff..e123e21 100644
--- a/acf/persistence/backends/files.lua
+++ b/acf/persistence/backends/files.lua
@@ -17,7 +17,7 @@ backend = require('acf.object').class()
function backend:init() self.cache = {} end
function backend:get(path, tpe)
- local name = pth.mjoin('/', unpack(path))
+ local name = pth.join('/', unpack(path))
if not self.cache[name] then
local t = posix.stat(name, 'type')
@@ -30,7 +30,7 @@ function backend:get(path, tpe)
local res = {}
for _, fname in ipairs(posix.dir(name)) do
if not ({['.']=true, ['..']=true})[fname] then
- table.insert(res, fname)
+ table.insert(res, pth.name(fname))
end
end
return res
@@ -46,7 +46,7 @@ end
function backend:set(mods)
for _, mod in pairs(mods) do
local path, t, value = unpack(mod)
- local name = pth.mjoin('/', unpack(path))
+ local name = pth.join('/', unpack(path))
-- TODO save references (t == 'reference') as symlinks