oll3 / bita

Differential file synchronization over http
https://crates.io/crates/bita
MIT License
265 stars 10 forks source link

fix: do not panic on unexpected end of archive #45

Closed oll3 closed 7 months ago

oll3 commented 7 months ago

When cloning from an archive which ends unexpectedly we should no longer panic. The panic previously occurred when the caller continued to read from the chunk stream after the first error. Now the stream is closed after the first error.

This might fix #40 since ending up with a truncated archive seems like the most likely way to corrupt a file during a copy.