small fix in hash from zsdiff

This commit is contained in:
2025-10-17 14:04:34 +03:00
parent 54500810a0
commit c4c0ad2e12

View File

@@ -109,10 +109,11 @@ pub async fn zsdiff(
utils::compress_parts(parts, &fs::File::create(output_filename)?, level).await;
let output_data = fs::read(output_filename)?;
let size_after = output_data.len();
let output_hash = format!("{} {}", get_hash(output_data).await, output_filename);
let hash = get_hash(output_data).await;
let output_hash = format!("{} {}", hash.clone(), output_filename);
fs::File::create(format!("{}.md5", output_filename))?.write_all(output_hash.as_bytes())?;
let elapsed = now.elapsed();
println!("Zsdiff hash: {}", output_hash);
println!("Zsdiff hash: {}", hash);
println!("Size before: {:.1?}KB", size_before / 1024);
println!("Size after: {:.1?}KB", size_after / 1024);
println!(