Improve testing infra for rsync roundtrip

This commit is contained in:
Kovid Goyal
2023-07-04 05:15:03 +05:30
parent 26c93af565
commit 678ad627b2
2 changed files with 44 additions and 27 deletions

View File

@@ -192,7 +192,7 @@ func (self *Differ) CreateDelta(src io.Reader, output_callback func([]byte) erro
if err = self.finish_signature_data(); err != nil {
return
}
if len(self.signature) == 0 {
if self.signature == nil {
return fmt.Errorf("Cannot call CreateDelta() before loading a signature")
}
self.rsync.CreateDelta(src, self.signature, func(op Operation) error {