updater error logs
This commit is contained in:
@@ -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()
|
||||
|
@@ -108,13 +108,14 @@ func updateEpochStatus() {
|
||||
|
||||
// Check for Epoch-specific files
|
||||
epochPatchesApplied := false
|
||||
stats, err := epoch.Update(paths.EpochPath, false, true, true)
|
||||
if err != nil {
|
||||
log.Debugf("Failed to get download Epoch patches: %v", err)
|
||||
}
|
||||
if stats.Outdated == 0 {
|
||||
log.Debug("Nothing is outdated")
|
||||
epochPatchesApplied = true
|
||||
stats := epoch.Update(paths.EpochPath, false, true, true)
|
||||
if stats.Error != nil {
|
||||
log.Error(stats.Error.Error())
|
||||
} else {
|
||||
if stats.Outdated == 0 {
|
||||
log.Debug("Everything is up-to-date!")
|
||||
epochPatchesApplied = true
|
||||
}
|
||||
}
|
||||
|
||||
// Check if patched files have the correct size (matches bundled versions)
|
||||
|
Reference in New Issue
Block a user