summaryrefslogtreecommitdiffstats
path: root/aconf/path.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-01-30 00:09:23 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-01-30 00:09:46 +0200
commit07a0eb180872401b271de40190603df8f3ab3db2 (patch)
tree35de2598fc5013946b2ddefcd9d613f6d4a5fabe /aconf/path.lua
parent23d685c951cb52c5a895acda5fca3390eda49c80 (diff)
downloadaconf-07a0eb180872401b271de40190603df8f3ab3db2.tar.bz2
aconf-07a0eb180872401b271de40190603df8f3ab3db2.tar.xz
specify search pattern for references
Diffstat (limited to 'aconf/path.lua')
-rw-r--r--aconf/path.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/aconf/path.lua b/aconf/path.lua
index e13f17c..85fc347 100644
--- a/aconf/path.lua
+++ b/aconf/path.lua
@@ -1,5 +1,5 @@
--[[
-Copyright (c) 2012-2014 Kaarle Ritvanen
+Copyright (c) 2012-2015 Kaarle Ritvanen
See LICENSE file for license details
--]]
@@ -33,7 +33,9 @@ function M.rawjoin(p1, p2, ...)
end
function M.join(parent, ...)
- return M.rawjoin(parent, table.unpack(map(M.escape, {...})))
+ local args = map(M.escape, {...})
+ if parent > '' then table.insert(args, 1, parent) end
+ return M.rawjoin(table.unpack(args))
end