ffiwrapper: More correct error check on openPartialFile

This commit is contained in:
Łukasz Magiera 2020-09-02 18:43:11 +02:00
parent 82f5984de1
commit ca7aa69597

View File

@ -372,6 +372,10 @@ func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector abi.Se
pf, err := openPartialFile(maxPieceSize, path.Unsealed)
if err != nil {
if xerrors.Is(err, os.ErrNotExist) {
return false, nil
}
return false, xerrors.Errorf("opening partial file: %w", err)
}