Skip to content

Commit

Permalink
search directory that the executable is in for maFiles (#277)
Browse files Browse the repository at this point in the history
closes #275
  • Loading branch information
dyc3 authored Jul 5, 2023
1 parent d3b9471 commit a2b3f18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,13 @@ fn get_selected_accounts(
}

fn get_mafiles_dir() -> String {
let paths = vec![
let mut paths = vec![
Path::new(&dirs::config_dir().unwrap()).join("steamguard-cli/maFiles"),
Path::new(&dirs::home_dir().unwrap()).join("maFiles"),
];
if let Ok(current_exe) = std::env::current_exe() {
paths.push(current_exe.parent().unwrap().join("maFiles"));
}

for path in &paths {
if path.join("manifest.json").is_file() {
Expand Down

0 comments on commit a2b3f18

Please sign in to comment.