From: Matt Joiner Date: Thu, 10 Jul 2025 06:31:28 +0000 (+1000) Subject: file storage: When file verification fails, we forgot to pass back incomplete X-Git-Tag: v1.59.0~40 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5eecf3ce9b860098103ebe89fa63fd25379657a9;p=btrtrc.git file storage: When file verification fails, we forgot to pass back incomplete --- diff --git a/storage/file-piece.go b/storage/file-piece.go index 31bc9463..07257a39 100644 --- a/storage/file-piece.go +++ b/storage/file-piece.go @@ -103,11 +103,13 @@ func (me *filePieceImpl) Completion() Completion { } if !verified { - // The completion was wrong, fix it. + // The completion was wrong, fix it. TODO: Fix all other affected pieces too so we don't + // spam log messages, or record that the file is known to be bad until it comes good again. err := me.MarkNotComplete() if err != nil { c.Err = fmt.Errorf("error marking piece not complete: %w", err) } + c.Complete = false } return c