Skip to content

Commit

Permalink
Find flatpak steam location (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipK authored May 17, 2022
1 parent faea4e0 commit 0dab904
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/steam/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,14 @@ pub fn get_default_location() -> Result<String, Box<dyn Error + Sync + Send>> {
#[cfg(target_os = "linux")]
let path_string = {
let home = std::env::var("HOME")?;
String::from(
Path::new(&home)
let default_path = Path::new(&home)
.join(".steam")
.join("steam")
.to_str()
.unwrap_or(""),
)
.join("steam");
if default_path.exists(){
default_path.to_string_lossy().to_string()
}else{
Path::new(&home).join(".var").join("app").join("com.valvesoftware.Steam").join(".steam").join("steam").to_string_lossy().to_string()
}
};
#[cfg(target_os = "macos")]
let path_string = {
Expand Down

0 comments on commit 0dab904

Please sign in to comment.