diff options
author | metamuffin <metamuffin@disroot.org> | 2025-03-15 15:18:40 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-03-15 15:18:40 +0100 |
commit | d836e24357b81496c61f3cc9195ba36758523578 (patch) | |
tree | 0028aee5a453cc761dd39e92430a35c55147537f /exporter/src/bin/meshes.rs | |
parent | 07fc3656274117c211ca0d6a54926d390a4d9b68 (diff) | |
download | unity-tools-d836e24357b81496c61f3cc9195ba36758523578.tar unity-tools-d836e24357b81496c61f3cc9195ba36758523578.tar.bz2 unity-tools-d836e24357b81496c61f3cc9195ba36758523578.tar.zst |
more abstraction around unityfs to read multiple files from a single reader
Diffstat (limited to 'exporter/src/bin/meshes.rs')
-rw-r--r-- | exporter/src/bin/meshes.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/exporter/src/bin/meshes.rs b/exporter/src/bin/meshes.rs index e3758c4..db8f2f8 100644 --- a/exporter/src/bin/meshes.rs +++ b/exporter/src/bin/meshes.rs @@ -14,13 +14,14 @@ use unity_tools::{ fn main() -> anyhow::Result<()> { env_logger::init_from_env("LOG"); - let file = || BufReader::new(File::open(args().nth(1).unwrap()).unwrap()); - let mut fs = UnityFS::open(file())?; + let file = BufReader::new(File::open(args().nth(1).unwrap()).unwrap()); + let fs = UnityFS::open(file)?; let mut i = 0; create_dir_all("/tmp/a").unwrap(); let cabfile = fs + .header .nodes() .iter() .find(|n| !n.name.ends_with(".resource") && !n.name.ends_with(".resS")) |