diff options
Diffstat (limited to 'aconf')
-rw-r--r-- | aconf/model/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aconf/model/init.lua b/aconf/model/init.lua index c0b5998..a4c7a4b 100644 --- a/aconf/model/init.lua +++ b/aconf/model/init.lua @@ -155,9 +155,9 @@ function M.Reference:normalize(context, value) if type(value) ~= 'string' then raise(path, 'Path name must be string') end local rel = value + local scope = self:abs_scope(context) if M.path.is_absolute(rel) then - local scope = self:abs_scope(context) local prefix = scope..'/' if not stringy.startswith(rel, prefix) then raise(path, 'Reference out of scope ('..scope..')') @@ -168,7 +168,7 @@ function M.Reference:normalize(context, value) -- TODO check instance type relabel(path, self.follow, self, context, rel) - return self.dereference and value or rel + return self.dereference and M.path.to_absolute(value, scope) or rel end function M.Reference:deleted(context, addr) |