From f955b5848165979c67036b8190ffcd14af96ca4c Mon Sep 17 00:00:00 2001 From: yellowsink Date: Fri, 29 Nov 2024 22:05:12 +0000 Subject: [PATCH] macos is annoying --- installer.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/installer.go b/installer.go index 11b52d2..12ef8e5 100644 --- a/installer.go +++ b/installer.go @@ -155,6 +155,14 @@ func uninstallTraditionalShelter(instance DiscordInstance, removing bool) bool { } else { err = os.Rename(filepath.Join(instance.PathRes, "original.asar"), filepath.Join(instance.PathRes, "app.asar")) + // macos sucks, so we need to double-check that this actually goddamn worked. great. + _, serr := os.Stat(filepath.Join(instance.PathRes, "app.asar")) + + if serr != nil { + dialog.Message("%s", "Removing your old-style shelter installation requires the App Management permission. Please allow this in System Settings > Security & Privacy > Privacy and try again, or manually uninstall shelter.").Error() + return false + } + if err == nil { err = os.RemoveAll(filepath.Join(instance.PathRes, "app")) }