From 5eecf3ce9b860098103ebe89fa63fd25379657a9 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 10 Jul 2025 16:31:28 +1000 Subject: [PATCH] file storage: When file verification fails, we forgot to pass back incomplete --- storage/file-piece.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.51.0