Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Fixes for dumb things
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Smith committed Jun 1, 2022
1 parent f01d53e commit d930b61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bcml/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ def disable_bcml_gfx():

def link_master_mod(output: Path = None):
util.create_bcml_graphicpack_if_needed()
rsext.manager.link_master_mod(str(output.absolute()))
rsext.manager.link_master_mod(str(output.resolve()) if output else None)
# if not output:
# if not util.get_settings(
# "export_dir" if util.get_settings("wiiu") else "export_dir_nx"
Expand Down
1 change: 1 addition & 0 deletions src/mergers/actorinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ fn merge_actorinfo(py: Python, modded_actors: Vec<u8>) -> PyResult<()> {
);
let output = util::settings()
.master_mod_dir()
.join(util::content())
.join("Actor/ActorInfo.product.sbyml");
if !output.parent().unwrap().exists() {
std::fs::create_dir_all(output.parent().unwrap())?;
Expand Down
9 changes: 7 additions & 2 deletions src/mergers/pack.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
util::{self, settings},
Result,
Result, RustError,
};
use anyhow::Context;
use cow_utils::CowUtils;
Expand Down Expand Up @@ -125,7 +125,12 @@ pub fn merge_sarcs(py: Python, diffs: HashMap<PathBuf, Vec<PathBuf>>) -> PyResul
}
let sarcs = sarc_paths
.iter()
.map(|file| -> Result<Sarc> { Ok(Sarc::read(std::fs::read(&file)?)?) })
.filter_map(|file| -> Option<Result<Sarc>> {
std::fs::read(&file)
.map(|data| Sarc::read(data).ok())
.map_err(RustError::from)
.transpose()
})
.collect::<Result<Vec<Sarc>>>()?;
let mut merged = merge_sarc(sarcs, settings.endian())?;
if out.extension().unwrap().to_str().unwrap().starts_with('s') {
Expand Down

0 comments on commit d930b61

Please sign in to comment.