Skip to content

Commit

Permalink
Fix some distinct applications being erronously merged
Browse files Browse the repository at this point in the history
  • Loading branch information
Klocman committed May 20, 2023
1 parent 6b868aa commit e4b5147
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/UninstallTools/Factory/ApplicationEntryTools.cs
Expand Up @@ -42,12 +42,14 @@ public static int AreEntriesRelated(ApplicationUninstallerEntry baseEntry, Appli
if (PathTools.PathsEqual(baseEntry.UninstallString, otherEntry.UninstallString))
return 100;

if (!string.IsNullOrEmpty(otherEntry.InstallLocation)
if (otherEntry.IsOrphaned
&& !string.IsNullOrEmpty(otherEntry.InstallLocation)
&& baseEntry.UninstallString.Contains(otherEntry.InstallLocation, StringComparison.InvariantCultureIgnoreCase))
return 100;
}

if (!string.IsNullOrEmpty(baseEntry.UninstallerLocation) && !string.IsNullOrEmpty(otherEntry.InstallLocation)
if (otherEntry.IsOrphaned
&& !string.IsNullOrEmpty(baseEntry.UninstallerLocation) && !string.IsNullOrEmpty(otherEntry.InstallLocation)
&& baseEntry.UninstallerLocation.StartsWith(otherEntry.InstallLocation, StringComparison.InvariantCultureIgnoreCase))
return 100;

Expand Down

0 comments on commit e4b5147

Please sign in to comment.