ソースを参照

Fixed returning subdirectory duplicates in example

tznind 4 年 前
コミット
4047154eec

+ 1 - 1
Terminal.Gui/Views/TreeView.cs

@@ -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));
 		}

+ 1 - 1
UICatalog/Scenarios/TreeViewFileSystem.cs

@@ -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};