Fix chmodding

This commit is contained in:
2025-07-24 09:01:25 -07:00
parent 8edd61dbba
commit a973508d92
3 changed files with 6 additions and 15 deletions

View File

@@ -206,23 +206,14 @@ func PatchEpoch(myWindow fyne.Window, updateAllStatuses func()) {
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
})
// Ensure permissions on Data directory is correct
err := os.Chmod(filepath.Join(paths.EpochPath, "Data"), 0755)
if err != nil {
msg := fmt.Sprintf("Failed to set wow directory permissions: %v", err)
msg := fmt.Sprintf("Failed to set Data directory permissions: %v", err)
log.Error(msg)
dialog.ShowInformation("Error", msg, myWindow)
} else {
log.Debug("Successfully set wow directory permissions")
log.Debug("Successfully set Data directory permissions")
}
go func() {