Skip to content

Commit

Permalink
#330: Check XDG folders inside of Flatpak Steam
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Apr 17, 2024
1 parent a7ac0b9 commit a8c22d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,9 @@
Note that these errors are shown as-is for troubleshooting and may not be translated.
* You can now set aliases to display instead of the original name.
This does not affect the CLI when using `--api`.
* On Linux, for Steam roots that point to a Flatpak installation,
Ludusavi now checks `$XDG_DATA_HOME` and `$XDG_CONFIG_HOME`
inside of the Flatpak installation of Steam.
* Updated translations, including new in-progress translations for Traditional Chinese and Turkish.
(Thanks to contributors on the [Crowdin project](https://crowdin.com/project/ludusavi))
* Fixed:
Expand Down
11 changes: 11 additions & 0 deletions src/scan.rs
Expand Up @@ -281,6 +281,17 @@ pub fn parse_paths(
}
}
if root.store == Store::Steam && Os::HOST == Os::Linux {
// Check XDG folders inside of Steam installation.
if root_interpreted.ends_with(".var/app/com.valvesoftware.Steam/.steam/steam") {
paths.insert((
path.replace(STORE_USER_ID, "*")
.replace(OS_USER_NAME, &crate::prelude::OS_USERNAME)
.replace(XDG_DATA, &format!("{}../../.local/share", &root_interpreted))
.replace(XDG_CONFIG, &format!("{}../../.config", &root_interpreted)),
platform.is_case_sensitive(),
));
}

for id in steam_ids {
let prefix = format!("{}/steamapps/compatdata/{}/pfx/drive_c", &root_interpreted, id);
let path2 = path
Expand Down

0 comments on commit a8c22d1

Please sign in to comment.