Skip to content

Commit

Permalink
Merge pull request #50 from Minemobs/master
Browse files Browse the repository at this point in the history
Added windows paths support for colorscripts detection
  • Loading branch information
ckaznable authored Jul 14, 2024
2 parents b9a1df4 + acd8161 commit 046480f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ fn get_assets_dir_path() -> Result<PathBuf> {
}
};

// Windows equivalent
#[cfg(windows)]
if let Ok(data_dir) = std::env::var("LOCALAPPDATA") {
let data_home = Path::new(&data_dir).join("poketex");
let assets_dir = data_home.join(assets_path);
if assets_dir.exists() {
return Ok(assets_dir);
}
}

let usr_dir = Path::new("/usr/share/poketex");
let assets_dir = usr_dir.join(assets_path);
if assets_dir.exists() {
Expand Down

0 comments on commit 046480f

Please sign in to comment.