From 3ac81818179d9c9f19e873ad1ae5cb5b4ab77761 Mon Sep 17 00:00:00 2001 From: Cilraaz Date: Mon, 24 Aug 2026 19:17:19 -0400 Subject: [PATCH] fix(epic.go): Fix appName detection --- backend/installfinders/launchers/epic/epic.go | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/backend/installfinders/launchers/epic/epic.go b/backend/installfinders/launchers/epic/epic.go index 667b5f90..af244d46 100644 --- a/backend/installfinders/launchers/epic/epic.go +++ b/backend/installfinders/launchers/epic/epic.go @@ -103,28 +103,29 @@ func FindInstallationsEpic(epicManifestsPath string, launcher string, platform c continue } - branch, err := GetEpicBranch(epicManifest.MainGameAppName) - if err != nil { - // Some Epic installs appear to come in with a null MainGameAppName; fall back to AppName - branch, err = GetEpicBranch(epicManifest.AppName) + appName := epicManifest.MainGameAppName + if appName == "" { + appName = epicManifest.AppName } + + branch, err := GetEpicBranch(appName) if err != nil { - findErrors = append(findErrors, common.InstallFindError{ - Path: installLocation, - Inner: err, - }) - continue + findErrors = append(findErrors, common.InstallFindError{ + Path: installLocation, + Inner: err, + }) + continue } installs = append(installs, &common.Installation{ - Path: filepath.Clean(installLocation), - Version: version, - Type: installType, - Location: common.LocationTypeLocal, - Branch: branch, - Launcher: launcher, - LaunchPath: platform.LauncherCommand(epicManifest.MainGameAppName), - SavedPath: savedPath, + Path: filepath.Clean(installLocation), + Version: version, + Type: installType, + Location: common.LocationTypeLocal, + Branch: branch, + Launcher: launcher, + LaunchPath: platform.LauncherCommand(appName), + SavedPath: savedPath, }) }