@@ -340,15 +340,15 @@ open class FileTreeNode() {
340340 val clone = FileTreeNode (null , name, isDir)
341341 clone.fileTemplates = fileTemplates?.toMutableMap()
342342 clone.placeholders = placeholders?.toMutableMap()
343- children .forEach {
343+ realChildren .forEach {
344344 clone.addChild(it.clone())
345345 }
346346 return clone
347347 }
348348
349349 private fun removeChild (label : String ): FileTreeNode ? {
350350 if (hasChild(label)) {
351- children .remove(labeledChildren[label])
351+ realChildren .remove(labeledChildren[label])
352352 return labeledChildren.remove(label)
353353 }
354354 return null
@@ -360,8 +360,8 @@ open class FileTreeNode() {
360360 str.append(it)
361361 }
362362 str.append(when (this ) {
363- parent?.children ?.last() -> " └─"
364- parent?.children ?.first() -> " ├─"
363+ parent?.realChildren ?.last() -> " └─"
364+ parent?.realChildren ?.first() -> " ├─"
365365 else -> {
366366 when {
367367 parent != null -> " ├─"
@@ -371,13 +371,13 @@ open class FileTreeNode() {
371371 })
372372 str.append(getRealName()).append(" \n " )
373373
374- if (! children .isNullOrEmpty()) {
374+ if (! realChildren .isNullOrEmpty()) {
375375 head.push(when {
376376 parent == null -> " "
377- parent?.children ?.last() != this -> " │\t "
377+ parent?.realChildren ?.last() != this -> " │\t "
378378 else -> " \t "
379379 })
380- children .forEach {
380+ realChildren .forEach {
381381 str.append(it.getNodeGraph(head))
382382 }
383383 head.pop()
@@ -386,7 +386,7 @@ open class FileTreeNode() {
386386 }
387387
388388 private fun createChild () {
389- children .forEach {
389+ realChildren .forEach {
390390 val file = File (it.getPath())
391391 if (file.exists()) {
392392 Logger .d(TAG , " ${file.absolutePath} already exists." )
0 commit comments