@@ -7,7 +7,7 @@ use std::path::{Path, PathBuf};
7
7
use anyhow:: Context ;
8
8
use binrw:: BinRead ;
9
9
use binrw:: io:: BufReader ;
10
-
10
+ use tracing :: { info , warn } ;
11
11
use crate :: { crypto, Args , unity} ;
12
12
use crate :: command:: { ArtHeader , DATA_FOLDER_NAME } ;
13
13
use crate :: unity:: AssetsFile ;
@@ -63,7 +63,7 @@ fn find_input(args: &Args, input: &Option<PathBuf>) -> anyhow::Result<PathBuf> {
63
63
pub fn unpack_dat ( args : & Args , input : & PathBuf , output : & PathBuf ) -> anyhow:: Result < ( ) > {
64
64
let mut data = std:: fs:: read ( input)
65
65
. context ( "Failed to read input file" ) ?;
66
- println ! ( "Unpacking assets from: {}" , input. display( ) ) ;
66
+ info ! ( "Unpacking assets from: {}" , input. display( ) ) ;
67
67
68
68
// key can be unwrapped safely here
69
69
let key = args. art_key . clone ( ) . unwrap ( ) ;
@@ -93,7 +93,7 @@ pub fn unpack_dat(args: &Args, input: &PathBuf, output: &PathBuf) -> anyhow::Res
93
93
if let Some ( parent) = path. parent ( ) {
94
94
std:: fs:: create_dir_all ( parent) ?;
95
95
if !parent. canonicalize ( ) ?. starts_with ( & abs_output) {
96
- eprintln ! ( "Skipping asset: {} (Tried escaping output directory)" , asset. name) ;
96
+ warn ! ( "Skipping asset: {} (Tried escaping output directory)" , asset. name) ;
97
97
continue ;
98
98
}
99
99
}
@@ -102,7 +102,7 @@ pub fn unpack_dat(args: &Args, input: &PathBuf, output: &PathBuf) -> anyhow::Res
102
102
. context ( format ! ( "Failed to write asset {} to file" , asset. name) ) ?;
103
103
}
104
104
105
- println ! ( "Unpacked {} assets" , assets. len( ) ) ;
105
+ info ! ( "Unpacked {} assets" , assets. len( ) ) ;
106
106
107
107
Ok ( ( ) )
108
108
}
@@ -136,7 +136,7 @@ pub fn unpack_assets(args: &Args, input_path: &PathBuf, output: &PathBuf, proces
136
136
137
137
if name == "Art.dat" {
138
138
let temp = PathBuf :: from ( "./temp-art.dat" ) ;
139
- println ! ( "Found Art.dat in unity assets. Temporarily saving to: {}" , temp. display( ) ) ;
139
+ info ! ( "Found Art.dat in unity assets. Temporarily saving to: {}" , temp. display( ) ) ;
140
140
141
141
let temp_writer = File :: create ( & temp)
142
142
. context ( "Failed to create temporary file" ) ?;
@@ -167,9 +167,9 @@ pub fn unpack_assets(args: &Args, input_path: &PathBuf, output: &PathBuf, proces
167
167
168
168
if let Some ( art_file) = art_file {
169
169
unpack_dat ( args, & art_file, output) ?;
170
- println ! ( "Removing temporary file: {}" , art_file. display( ) ) ;
170
+ info ! ( "Removing temporary file: {}" , art_file. display( ) ) ;
171
171
if let Err ( e) = std:: fs:: remove_file ( art_file) {
172
- eprintln ! ( "Failed to remove temporary file: {}" , e) ;
172
+ warn ! ( "Failed to remove temporary file: {}" , e) ;
173
173
}
174
174
// Any unwraps here are safe because None values would've resulted in earlier bail
175
175
Ok ( RepackInfo {
0 commit comments