mirror of
https://github.com/Novattz/creamlinux-installer.git
synced 2026-08-01 19:18:25 -04:00
Fixed Heroic games installed via flatpak not being detected. #119
This commit is contained in:
@@ -30,17 +30,32 @@ struct InstalledEntry {
|
|||||||
|
|
||||||
fn legendary_config_dir() -> Option<PathBuf> {
|
fn legendary_config_dir() -> Option<PathBuf> {
|
||||||
let home = std::env::var("HOME").ok()?;
|
let home = std::env::var("HOME").ok()?;
|
||||||
let path = PathBuf::from(&home)
|
let home = PathBuf::from(&home);
|
||||||
.join(".config")
|
|
||||||
.join("heroic")
|
// Heroic can be installed natively or via Flatpak. Flatpak sandboxes
|
||||||
.join("legendaryConfig")
|
// XDG_CONFIG_HOME to ~/.var/app/<app-id>/config, so ~/.config/heroic
|
||||||
.join("legendary");
|
// never exists in that case even though the game library itself lives
|
||||||
if path.exists() {
|
// on the normal host path (e.g. on Steam Deck installs via Discover).
|
||||||
Some(path)
|
let candidates = [
|
||||||
} else {
|
home.join(".config").join("heroic"),
|
||||||
warn!("Heroic legendary config dir not found at: {}", path.display());
|
home.join(".var")
|
||||||
None
|
.join("app")
|
||||||
|
.join("com.heroicgameslauncher.hgl")
|
||||||
|
.join("config")
|
||||||
|
.join("heroic"),
|
||||||
|
];
|
||||||
|
|
||||||
|
for candidate in &candidates {
|
||||||
|
let path = candidate.join("legendaryConfig").join("legendary");
|
||||||
|
if path.exists() {
|
||||||
|
return Some(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warn!(
|
||||||
|
"Heroic legendary config dir not found in any known location (checked native and Flatpak paths)"
|
||||||
|
);
|
||||||
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn scan_epic_games() -> Vec<EpicGame> {
|
pub fn scan_epic_games() -> Vec<EpicGame> {
|
||||||
|
|||||||
Reference in New Issue
Block a user