Skip to content

Commit

Permalink
Merge pull request #3492 from filecoin-project/fix/readpiece-panic
Browse files Browse the repository at this point in the history
ffiwrapper: Fix ReadPiece panic
  • Loading branch information
magik6k authored Sep 2, 2020
2 parents 5aeabe3 + ca7aa69 commit b774563
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extern/sector-storage/ffiwrapper/sealer_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,11 @@ func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector abi.Se
maxPieceSize := abi.PaddedPieceSize(sb.ssize)

pf, err := openPartialFile(maxPieceSize, path.Unsealed)
if xerrors.Is(err, os.ErrNotExist) {
if err != nil {
if xerrors.Is(err, os.ErrNotExist) {
return false, nil
}

return false, xerrors.Errorf("opening partial file: %w", err)
}

Expand Down

0 comments on commit b774563

Please sign in to comment.