1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-25 22:07:44 +00:00

Don't use println

This commit is contained in:
Joshua Goins 2023-11-10 17:25:53 -05:00
parent b147027e58
commit b210782af0
3 changed files with 8 additions and 6 deletions

View file

@ -3,6 +3,7 @@
use std::fs;
use std::path::PathBuf;
use tracing::warn;
use crate::patch::{apply_patch, PatchError};
@ -44,7 +45,7 @@ impl BootData {
version: fs::read_to_string(format!("{directory}/ffxivboot.ver")).unwrap(),
}),
false => {
println!("Boot data is not valid!");
warn!("Boot data is not valid!");
None
}
}

View file

@ -6,7 +6,7 @@ use std::fs;
use std::fs::{DirEntry, ReadDir};
use std::path::PathBuf;
use tracing::debug;
use tracing::{debug, warn};
use crate::common::{Language, read_version};
use crate::dat::DatFile;
@ -34,7 +34,7 @@ fn is_valid(path: &str) -> bool {
let d = PathBuf::from(path);
if fs::metadata(d.as_path()).is_err() {
println!("Failed game directory.");
warn!("Game directory not found.");
return false;
}
@ -76,7 +76,7 @@ impl GameData {
index_files: HashMap::new()
}),
false => {
println!("Game data is not valid!");
warn!("Game data is not valid!");
None
}
}

View file

@ -10,6 +10,7 @@ use std::path::PathBuf;
use binrw::binread;
use binrw::BinRead;
use binrw::binrw;
use tracing::debug;
use crate::common::Region;
use crate::sqpack::read_data_block_patch;
@ -620,10 +621,10 @@ pub fn apply_patch(data_dir: &str, patch_path: &str) -> Result<(), PatchError> {
// Currently, IgnoreMissing and IgnoreOldMismatch is not used in XIVQuickLauncher either. This stays as an intentional NOP.
}
ChunkType::AddDirectory(_) => {
println!("PATCH: NOP AddDirectory");
debug!("PATCH: NOP AddDirectory");
}
ChunkType::DeleteDirectory(_) => {
println!("PATCH: NOP DeleteDirectory");
debug!("PATCH: NOP DeleteDirectory");
}
ChunkType::EndOfFile => {
return Ok(());