Assign correct path attribute to nodes

This commit is contained in:
Steven Barth 2008-11-16 13:52:39 +00:00
parent 173ceeecd0
commit 1ecec8981c

View file

@ -414,7 +414,6 @@ function node(...)
local c = _create_node({...}) local c = _create_node({...})
c.module = getfenv(2)._NAME c.module = getfenv(2)._NAME
c.path = arg
c.auto = nil c.auto = nil
return c return c
@ -430,10 +429,11 @@ function _create_node(path, cache)
local c = cache[name] local c = cache[name]
if not c then if not c then
local new = {nodes={}, auto=true, path=util.clone(path)}
local last = table.remove(path) local last = table.remove(path)
c = _create_node(path, cache) c = _create_node(path, cache)
local new = {nodes={}, auto=true}
c.nodes[last] = new c.nodes[last] = new
cache[name] = new cache[name] = new