Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions backend/installfinders/launchers/epic/epic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}

Expand Down