Skip to content

Commit

Permalink
Fix auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
NotroDev committed Aug 19, 2024
1 parent dfdc4dd commit abcc8d1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions SkEditor/Utilities/UpdateChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,18 @@ private static async Task DownloadUpdate(TaskDialog td, string url)
Process.Start(new ProcessStartInfo
{
FileName = _tempInstallerFile,
UseShellExecute = true,
Verb = "runas"
UseShellExecute = true
});

(Application.Current.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime).Shutdown();
}
catch
catch (Exception e)
{
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.Cancel); });
Dispatcher.UIThread.Post(() =>
{
td.Hide(TaskDialogStandardResult.Cancel);
SkEditorAPI.Windows.ShowError(Translation.Get("UpdateFailed") + "\n" + e.Message);
});
}
}

Expand Down

0 comments on commit abcc8d1

Please sign in to comment.