mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 09:18:01 +01:00
Fixed returning subdirectory duplicates in example
This commit is contained in:
@@ -375,7 +375,7 @@ namespace Terminal.Gui {
|
||||
public virtual void FetchChildren()
|
||||
{
|
||||
if (tree.ChildrenGetter == null)
|
||||
return;
|
||||
return;
|
||||
|
||||
this.ChildBranches = tree.ChildrenGetter(this.Model).ToDictionary(k=>k,val=>new Branch(tree,this,val));
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace UICatalog.Scenarios {
|
||||
// If it is a directory it's children are all contained files and dirs
|
||||
if(model is DirectoryInfo d) {
|
||||
try {
|
||||
return d.GetDirectories().Cast<object>().Union(d.GetFileSystemInfos());
|
||||
return d.GetFileSystemInfos();
|
||||
}
|
||||
catch(SystemException ex) {
|
||||
return new []{ex};
|
||||
|
||||
Reference in New Issue
Block a user