sftp: fixed retry logic with invalid seek (#911)

This commit is contained in:
Jarek Kowalski
2021-03-24 22:18:10 -07:00
committed by GitHub
parent 42836b2c46
commit dfe2e9c65e

View File

@@ -67,7 +67,7 @@ func (s *sftpImpl) GetBlobFromPath(ctx context.Context, dirPath, fullPath string
// parial read, seek to the provided offset and read given number of bytes.
if _, err = r.Seek(offset, io.SeekStart); err != nil {
return nil, errors.Wrap(err, "seek error")
return nil, errors.Wrapf(blob.ErrInvalidRange, "seek error: %v", err)
}
b := make([]byte, length)