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

@@ -3,4 +3,4 @@
Name = "EpochSilicon" Name = "EpochSilicon"
ID = "com.burkey.epochsilicon" ID = "com.burkey.epochsilicon"
Version = "1.0.0" Version = "1.0.0"
Build = 14 Build = 15

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) 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 paths.DownloadingPatches = true
log.Debug("Attempting to download Epoch patches...") 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() { go func() {
stats := epoch.Update(paths.EpochPath, true, true, false) stats := epoch.Update(paths.EpochPath, true, true, false)
if stats.Error != nil { if stats.Error != nil {