updater error logs

This commit is contained in:
2025-07-24 06:53:02 -07:00
parent 087923a13f
commit 67daf7027d
4 changed files with 30 additions and 19 deletions

View File

@@ -205,20 +205,24 @@ func PatchEpoch(myWindow fyne.Window, updateAllStatuses func()) {
dialog.ShowInformation("Downloading patches", "Downloading patches for Project Epoch, this will take some time. Please wait until the status changes to \"Patched\"", myWindow)
paths.DownloadingPatches = true
go func() {
stats, err := epoch.Update(paths.EpochPath, true, true, false)
if err != nil {
errMsg := fmt.Sprintf("failed to update Epoch files: %v", err)
log.Debug("Attempting to download patches...")
stats := epoch.Update(paths.EpochPath, true, true, false)
if stats.Error != nil {
errMsg := fmt.Sprintf("failed to update Epoch files: %v", stats.Error)
fyne.Do(func() {
dialog.ShowError(errors.New(errMsg), myWindow)
})
paths.DownloadingPatches = false
log.Error(errMsg)
} else {
for _, msg := range stats.LogMessages {
log.Debug(msg)
}
log.Infof("Successfully updated %d Epoch files", stats.Updated)
log.Debug("Epoch patching with bundled resources completed successfully.")
fyne.Do(func() {
dialog.ShowInformation("Success", "Epoch patching process completed.", myWindow)
})
}
log.Infof("Successfully updated %d Epoch files", stats.Updated)
log.Debug("Epoch patching with bundled resources completed successfully.")
fyne.Do(func() {
dialog.ShowInformation("Success", "Epoch patching process completed.", myWindow)
})
fyne.DoAndWait(func() {
paths.DownloadingPatches = false
updateAllStatuses()