Skip to content

Commit

Permalink
fix(filters): prevent .StartsWith() from catching a file unintentionally
Browse files Browse the repository at this point in the history
  • Loading branch information
vwheeler63 committed Nov 22, 2024
1 parent 66993a1 commit 6735f57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions LvglProjectFileUpdater/LvglWindowsLibraryProjectUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ public static void Run()

foreach (ProjectItemElement Item in FiltersRoot.Items)
{
if (Item.Include.StartsWith(
@"lvgl") ||
if (Item.Include.StartsWith(@"lvgl\") ||
Item.Include == "lvgl" ||
Item.Include.StartsWith(
@"$(MSBuildThisFileDirectory)..\LvglPlatform\"))
{
Expand Down
12 changes: 6 additions & 6 deletions LvglProjectFileUpdater/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ static void UpdateLvglWindowsSimulator()

foreach (ProjectItemElement Item in FiltersRoot.Items)
{
if (Item.Include.StartsWith(
@"lvgl") ||
Item.Include.StartsWith(
@"freetype") ||
if (Item.Include.StartsWith(@"lvgl\") ||
Item.Include == "lvgl" ||
Item.Include.StartsWith(@"freetype\") ||
Item.Include == "freetype" ||
Item.Include.StartsWith(
@"$(MSBuildThisFileDirectory)..\LvglPlatform\"))
{
Expand Down Expand Up @@ -323,8 +323,8 @@ static void UpdateLvglWindowsDesktopApplication()

foreach (ProjectItemElement Item in FiltersRoot.Items)
{
if (Item.Include.StartsWith(
@"lvgl") ||
if (Item.Include.StartsWith(@"lvgl\") ||
Item.Include == "lvgl" ||
Item.Include.StartsWith(
@"$(MSBuildThisFileDirectory)..\LvglPlatform\"))
{
Expand Down

0 comments on commit 6735f57

Please sign in to comment.