1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-28 06:57:46 +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::fs;
use std::path::PathBuf; use std::path::PathBuf;
use tracing::warn;
use crate::patch::{apply_patch, PatchError}; use crate::patch::{apply_patch, PatchError};
@ -44,7 +45,7 @@ impl BootData {
version: fs::read_to_string(format!("{directory}/ffxivboot.ver")).unwrap(), version: fs::read_to_string(format!("{directory}/ffxivboot.ver")).unwrap(),
}), }),
false => { false => {
println!("Boot data is not valid!"); warn!("Boot data is not valid!");
None None
} }
} }

View file

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

View file

@ -10,6 +10,7 @@ use std::path::PathBuf;
use binrw::binread; use binrw::binread;
use binrw::BinRead; use binrw::BinRead;
use binrw::binrw; use binrw::binrw;
use tracing::debug;
use crate::common::Region; use crate::common::Region;
use crate::sqpack::read_data_block_patch; 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. // Currently, IgnoreMissing and IgnoreOldMismatch is not used in XIVQuickLauncher either. This stays as an intentional NOP.
} }
ChunkType::AddDirectory(_) => { ChunkType::AddDirectory(_) => {
println!("PATCH: NOP AddDirectory"); debug!("PATCH: NOP AddDirectory");
} }
ChunkType::DeleteDirectory(_) => { ChunkType::DeleteDirectory(_) => {
println!("PATCH: NOP DeleteDirectory"); debug!("PATCH: NOP DeleteDirectory");
} }
ChunkType::EndOfFile => { ChunkType::EndOfFile => {
return Ok(()); return Ok(());