Skip to content

Commit 089f24b

Browse files
committed
fix: can not create subgroups (#427)
1 parent bb749f2 commit 089f24b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ViewModels/ScanRepositories.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public override Task<bool> Sure()
4646

4747
foreach (var f in founded)
4848
{
49-
var relative = Path.GetDirectoryName(f).Substring(prefixLen);
49+
var fullpath = new DirectoryInfo(f);
50+
var relative = fullpath.Parent!.FullName.Replace("\\", "/").Substring(prefixLen);
5051
var group = FindOrCreateGroupRecursive(Preference.Instance.RepositoryNodes, relative);
5152
Preference.Instance.FindOrAddNodeByRepositoryPath(f, group, false);
5253
}

0 commit comments

Comments
 (0)