1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-24 21:37:46 +00:00

Improve patch NOP logging

This commit is contained in:
Joshua Goins 2022-09-13 16:51:32 -04:00
parent ca6a5be72b
commit 0dd4121557

View file

@ -560,15 +560,15 @@ pub(crate) fn apply_patch(data_dir: &str, patch_path: &str) -> Result<(), PatchE
fs::remove_file(new_path.as_str())?; fs::remove_file(new_path.as_str())?;
} }
SqpkFileOperation::RemoveAll => { SqpkFileOperation::RemoveAll => {
println!("have to remove all files in {}...", fop.path); println!("PATCH: NOP RemoveAll");
} }
} }
} }
SqpkOperation::IndexAddDelete(_) => { SqpkOperation::IndexAddDelete(_) => {
println!("NOP"); println!("PATCH: NOP IndexAddDelete");
}, },
SqpkOperation::PatchInfo(patch_info) => { SqpkOperation::PatchInfo(patch_info) => {
println!("Got patch info: {:#?}", patch_info); println!("PATCH: NOP PatchInfo");
} }
SqpkOperation::TargetInfo(new_target_info) => { SqpkOperation::TargetInfo(new_target_info) => {
target_info = Some(new_target_info); target_info = Some(new_target_info);
@ -576,13 +576,17 @@ pub(crate) fn apply_patch(data_dir: &str, patch_path: &str) -> Result<(), PatchE
} }
} }
ChunkType::FileHeader(header) => { ChunkType::FileHeader(header) => {
println!("Got file header: {:#?}", header); println!("PATCH: NOP FileHeader");
} }
ChunkType::ApplyOption(option) => { ChunkType::ApplyOption(option) => {
println!("apply option: {:#?}", option); println!("PATCH: NOP ApplyOption");
} }
ChunkType::AddDirectory(_) => todo!(), ChunkType::AddDirectory(_) => {
ChunkType::DeleteDirectory(_) => todo!(), println!("PATCH: NOP AddDirectory");
},
ChunkType::DeleteDirectory(_) => {
println!("PATCH: NOP DeleteDirectory");
},
ChunkType::EndOfFile => { ChunkType::EndOfFile => {
return Ok(()); return Ok(());
} }