TreeViewExtensions - Fix ArgumentOutOfRangeException when adding or replacing files(#38)

This commit is contained in:
miku-666
2024-06-27 19:30:45 +02:00
parent ff93889776
commit d5c7fe9af5
2 changed files with 7 additions and 1 deletions

View File

@@ -14,6 +14,12 @@ namespace PckStudio.Extensions
{
if (string.IsNullOrWhiteSpace(path))
return Array.Empty<TreeNode>();
if (!path.Contains(treeView.PathSeparator))
{
return treeView.Nodes.Find(path, false);
}
string segment = path.Substring(0, path.IndexOf(treeView.PathSeparator));
if (treeView.Nodes.ContainsKey(segment))
{

View File

@@ -32,6 +32,6 @@ using System.Security.Permissions;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.0.0")]
[assembly: AssemblyVersion("7.0.0.1")]
[assembly: AssemblyFileVersion("7.0.0.0")]
[assembly: NeutralResourcesLanguage("")]