fix: manifest generation with multiple chunks

This commit is contained in:
DecDuck
2025-08-15 21:56:33 +10:00
parent c67cca4ee0
commit bd30464a08
3 changed files with 21 additions and 7 deletions

View File

@ -80,17 +80,17 @@ pub fn generate_manifest<'a>(
length += read;
if length >= CHUNK_SIZE {
break;
}
// If we're out of data, add this chunk and then move onto the next file
if read == 0 {
file_empty = true;
break;
}
buffer.extend_from_slice(&buf[..read]);
buffer.extend_from_slice(&buf[0..read]);
if length >= CHUNK_SIZE {
break;
}
}
let chunk_id = Uuid::new_v4();