Fixed source paths containing ..

This commit is contained in:
starkos 2009-09-06 18:00:09 +00:00
parent eac0c654f8
commit 98e849508d
2 changed files with 18 additions and 6 deletions

View File

@ -43,13 +43,17 @@
-- add it if it doesn't exist already
local name = path.getname(p)
local child = tr.children[name]
if not child then
child = premake.tree.new(name)
child.path = p
premake.tree.insert(tr, child)
if name ~= ".." then
local child = tr.children[name]
if not child then
child = premake.tree.new(name)
child.path = p
premake.tree.insert(tr, child)
end
return child
else
return tr
end
return child
end

View File

@ -67,6 +67,14 @@
getresult())
end
function T.tree.SkipsDotDots()
tree.add(tr, "../MyProject/hello")
test.isequal(""
.. "MyProject"
.. ".hello",
getresult())
end
--
-- Tests for tree.getlocalpath()