1
0
Fork 0

Fix broken getPath() method

This commit is contained in:
andy 2005-03-27 17:30:51 +00:00
parent ca0fa1c427
commit 4718f2f8f0

View file

@ -29,10 +29,9 @@ Node = {
getNode : func { wrap(_getNode(me._g, arg)) },
getPath : func {
name = getName();
if(getIndex() != 0) { name = name ~ "[" ~ getIndex() ~ "]"; }
if(getParent()) { name = getParent().getPath() ~ "/" ~ name; }
else { name = "/" ~ name; }
name = me.getName();
if(me.getIndex() != 0) { name = name ~ "[" ~ me.getIndex() ~ "]"; }
if(me.getParent() != nil) { name = me.getParent().getPath() ~ "/" ~ name; }
return name;
},