Skip to content

Commit

Permalink
fix: custom-instance_path
Browse files Browse the repository at this point in the history
  • Loading branch information
iPixelGalaxy committed Aug 17, 2023
1 parent 9f4ed2f commit dce48df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/gui/src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub async fn detect_instances(save: bool) -> Vec<structs::Instance> {
let bsm_config_file = std::fs::File::open(bsm_config_path).unwrap();
let bsm_config: serde_json::Value = serde_json::from_reader(bsm_config_file).unwrap();

if bsm_config["installation_folder"].as_str().is_none() {
if bsm_config["installation-folder"].as_str().is_none() {
let bs_manager = documents_dir.join("BSManager").join("BSInstances");

for entry in std::fs::read_dir(bs_manager).unwrap() {
Expand All @@ -92,9 +92,10 @@ pub async fn detect_instances(save: bool) -> Vec<structs::Instance> {
}
}
} else {
let base_path = bsm_config["installation_folder"].as_str().unwrap(); // this is the base path for bs manager, not including BSManager
let base_path = bsm_config["installation-folder"].as_str().unwrap(); // this is the base path for bs manager, not including BSManager
let mut bs_manager = Path::new(base_path).join("BSManager");
bs_manager.push("BSInstances");
dbg!(&bs_manager);

for entry in std::fs::read_dir(bs_manager).unwrap() {
let entry = entry.unwrap();
Expand Down

0 comments on commit dce48df

Please sign in to comment.