Skip to content

Commit

Permalink
Fix file not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
RedstoneWizard08 committed Mar 21, 2023
1 parent 1e7c991 commit 455c1f0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions common/src/installer/mods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,15 @@ impl ModInstaller {
.expect("Could not move the BepInEx folder!");
}

for file in bep_in_ex_dir.read_dir().unwrap() {
let file = file.unwrap();

instance_mod.paths.push(
"BepInEx/plugins/".to_string()
+ file.file_name().into_string().unwrap().as_str(),
);
if bep_in_ex_dir.exists() && bep_in_ex_dir.is_dir() {
for file in bep_in_ex_dir.read_dir().unwrap() {
let file = file.unwrap();

instance_mod.paths.push(
"BepInEx/plugins/".to_string()
+ file.file_name().into_string().unwrap().as_str(),
);
}
}
}
} else {
Expand Down

0 comments on commit 455c1f0

Please sign in to comment.