Skip to content

Commit

Permalink
#1739: Detection of upgrading in events
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-shilo committed Feb 8, 2025
1 parent e0e023e commit 99ccab1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/src/WixSharp/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2829,7 +2829,8 @@ static public bool IsUpgrading(this Session session)
/// <value><c>true</c> if this instance is upgrading installed version; otherwise, <c>false</c>.</value>
static public bool IsUpgradingInstalledVersion(this Session session)
{
return session.IsInstalling() && !session.IsModifying() && session.Property("FOUNDPREVIOUSVERSION").IsNotEmpty();
return session.IsInstalling() && !session.IsModifying() &&
(session.Property("FOUNDPREVIOUSVERSION").IsNotEmpty() || session.LookupInstalledVersion() != null);
}

/// <summary>
Expand Down

0 comments on commit 99ccab1

Please sign in to comment.