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/probe.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/probe.rs')
-rw-r--r-- | exporter/src/bin/probe.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/exporter/src/bin/probe.rs b/exporter/src/bin/probe.rs index feca633..043444d 100644 --- a/exporter/src/bin/probe.rs +++ b/exporter/src/bin/probe.rs @@ -4,16 +4,16 @@ use unity_tools::{serialized_file::SerializedFileHeader, unityfs::UnityFS}; fn main() -> Result<()> { let file = BufReader::new(File::open(args().nth(1).unwrap())?); - let mut fs = UnityFS::open(file)?; + let fs = UnityFS::open(file)?; let node = fs.find_main_file().unwrap().to_owned(); let mut cab = fs.read(&node)?; let ch = SerializedFileHeader::read(&mut cab)?; - if fs.unity_version.is_ascii() && ch.generator_version.is_ascii() && ch.format < 100 { + if fs.header.unity_version.is_ascii() && ch.generator_version.is_ascii() && ch.format < 100 { println!( "{}\t{}\t{}\t{}", - fs.file_version, fs.unity_version, ch.format, ch.generator_version + fs.header.file_version, fs.header.unity_version, ch.format, ch.generator_version ); } |