New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug4481 #128

Merged
merged 2 commits into from Aug 5, 2014
Jump to file or symbol
Failed to load files and symbols.
+13 −5
Diff settings

Always

Just for now

Next

Bug 4481 | WixBA plans and applies twice when auto uninstalling and t…

…he update detection fails
  • Loading branch information...
jchoover committed Aug 1, 2014
commit 618270d94b9ee0468ad84016ce5d9d6174f687db
@@ -58,7 +58,7 @@ public UpdateViewModel(RootViewModel root)
public bool CheckingEnabled
{
get { return this.State == UpdateState.Initializing || this.State == UpdateState.Checking || this.State == UpdateState.Unknown; }
get { return this.State == UpdateState.Initializing || this.State == UpdateState.Checking; }
}
public bool IsUpToDate
@@ -143,7 +143,8 @@ public string Title
private void DetectUpdateBegin(object sender, Bootstrapper.DetectUpdateBeginEventArgs e)
{
if (UpdateState.Failed != this.State)
// Don't check for updates if the first check failed (no retry), or if we are being ran as an uninstall.
if ((UpdateState.Failed != this.State) && (LaunchAction.Uninstall != WixBA.Model.Command.Action))
{
this.State = UpdateState.Checking;
e.Result = Result.Ok;
@@ -177,10 +178,17 @@ private void DetectUpdateComplete(object sender, Bootstrapper.DetectUpdateComple
this.State = UpdateState.Failed;
WixBA.Model.Engine.Detect();
}
else if (UpdateState.Checking == this.State)
else if ((UpdateState.Checking == this.State) || (UpdateState.Initializing == this.State))
{
this.State = UpdateState.Current;
if (LaunchAction.Uninstall != WixBA.Model.Command.Action)
{
this.State = UpdateState.Current;
}
else
{
this.State = UpdateState.Unknown;
}
}
}
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.