fix dir perms (#7)

Fixes #4

Reviewed-on: #7
This commit is contained in:
2025-07-24 15:40:04 +00:00
parent bc80ca2c9c
commit eafc55f67c
2 changed files with 21 additions and 1 deletions

View File

@@ -205,6 +205,26 @@ 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
log.Debug("Attempting to download Epoch patches...")
// Ensure permissions on WoW directory is correct
err := filepath.Walk(paths.EpochPath, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
err = os.Chmod(path, 0755)
if err != nil {
return err
}
return nil
})
if err != nil {
msg := fmt.Sprintf("Failed to set wow directory permissions: %v", err)
log.Error(msg)
dialog.ShowInformation("Error", msg, myWindow)
} else {
log.Debug("Successfully set wow directory permissions")
}
go func() {
stats := epoch.Update(paths.EpochPath, true, true, false)
if stats.Error != nil {