From eafc55f67c7eb08140b88a869bb5e3dfaeb28438 Mon Sep 17 00:00:00 2001 From: Evan Burkey Date: Thu, 24 Jul 2025 15:40:04 +0000 Subject: [PATCH] fix dir perms (#7) Fixes #4 Reviewed-on: https://git.burkey.co/eburk/EpochSilicon/pulls/7 --- FyneApp.toml | 2 +- pkg/patching/patching.go | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/FyneApp.toml b/FyneApp.toml index 5a28b63..21ec976 100644 --- a/FyneApp.toml +++ b/FyneApp.toml @@ -3,4 +3,4 @@ Name = "EpochSilicon" ID = "com.burkey.epochsilicon" Version = "1.0.0" - Build = 14 + Build = 15 diff --git a/pkg/patching/patching.go b/pkg/patching/patching.go index 54f8dae..943a6e4 100644 --- a/pkg/patching/patching.go +++ b/pkg/patching/patching.go @@ -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 {