Skip to content

Commit

Permalink
Fixed bug with solution item hierarchy generation (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptasev authored Sep 12, 2023
1 parent ee812ad commit c526d2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ public void HierarchyWithCollapsedFoldersIsCorrectlyFormed()
GetFolderStructureAsString(hierarchy.Folders).ShouldBe(
$@"{_driveRoot}zoo{Path.DirectorySeparatorChar}foo - foo
{_driveRoot}zoo{Path.DirectorySeparatorChar}foo{Path.DirectorySeparatorChar}bar - bar {SlnHierarchy.Separator} qux
{_driveRoot}zoo{Path.DirectorySeparatorChar}foo{Path.DirectorySeparatorChar}foo1 - foo1 {SlnHierarchy.Separator} foo2",
{_driveRoot}zoo{Path.DirectorySeparatorChar}foo{Path.DirectorySeparatorChar}foo1 - foo1
{_driveRoot}zoo{Path.DirectorySeparatorChar}foo{Path.DirectorySeparatorChar}foo1{Path.DirectorySeparatorChar}foo2 - foo2",
StringCompareShould.IgnoreLineEndings);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.VisualStudio.SlnGen/SlnHierarchy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private static void CreateHierarchy(SlnHierarchy hierarchy, KeyValuePair<string,
if (hierarchy._pathToSlnFolderMap.TryGetValue(directoryInfo!.FullName, out SlnFolder childFolder))
{
childFolder.SolutionItems.Add(solutionItem);
return;
continue;
}

childFolder = new SlnFolder(directoryInfo.FullName);
Expand Down

0 comments on commit c526d2b

Please sign in to comment.