Fix broken getPath() method
This commit is contained in:
parent
ca0fa1c427
commit
4718f2f8f0
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue