From a97f978cad5b832f658743e25eb9c14eb6e998aa Mon Sep 17 00:00:00 2001 From: Dirk McCormick Date: Mon, 7 Sep 2020 16:14:19 +0200 Subject: [PATCH] fix: storage manager - dont fail on successful read piece --- extern/sector-storage/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/sector-storage/manager.go b/extern/sector-storage/manager.go index 86a739c19..7513b2dbf 100644 --- a/extern/sector-storage/manager.go +++ b/extern/sector-storage/manager.go @@ -273,7 +273,7 @@ func (m *Manager) ReadPiece(ctx context.Context, sink io.Writer, sector abi.Sect return xerrors.Errorf("reading piece from sealed sector: %w", err) } - if readOk { + if !readOk { return xerrors.Errorf("failed to read unsealed piece") }