fix: can not create subgroups (#427)

This commit is contained in:
leo 2024-08-30 16:59:25 +08:00
parent bb749f225d
commit 089f24b0d2
No known key found for this signature in database

View file

@ -46,7 +46,8 @@ namespace SourceGit.ViewModels
foreach (var f in founded)
{
var relative = Path.GetDirectoryName(f).Substring(prefixLen);
var fullpath = new DirectoryInfo(f);
var relative = fullpath.Parent!.FullName.Replace("\\", "/").Substring(prefixLen);
var group = FindOrCreateGroupRecursive(Preference.Instance.RepositoryNodes, relative);
Preference.Instance.FindOrAddNodeByRepositoryPath(f, group, false);
}