Skip to content

Commit

Permalink
fix: watch mode should work when running as root
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Mar 13, 2024
1 parent 87e87f8 commit ff80dc4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/utils/steam/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,16 @@ impl Steam {
}

fn discover_localconfig() -> String {
let home = home_dir().unwrap();
let mut home = home.to_str().unwrap();

if home == "/root" {
// Fallback to checking all home folders when running as root
home = "/home";
}

let search: Vec<String> = SearchBuilder::default()
.location(home_dir().unwrap().to_str().unwrap())
.location(home)
.search_input("localconfig")
.limit(1)
.ext("vdf")
Expand Down

0 comments on commit ff80dc4

Please sign in to comment.