ffiwrapper: Fix UnsealPiece

This commit is contained in:
Łukasz Magiera 2020-07-08 19:51:26 +02:00
parent 56570a2200
commit 9af64c9b21
2 changed files with 5 additions and 2 deletions

View File

@ -254,7 +254,10 @@ func (sb *Sealer) UnsealPiece(ctx context.Context, sector abi.SectorID, offset s
defer sealed.Close()
var at, nextat abi.PaddedPieceSize
for {
first := true
for first || toUnseal.HasNext() {
first = false
piece, err := toUnseal.NextRun()
if err != nil {
return xerrors.Errorf("getting next range to unseal: %w", err)

View File

@ -22,4 +22,4 @@ func FileSize(path string) (SizeInfo, error) {
return SizeInfo{
stat.Blocks * 512,
}, nil
}
}