Skip to content

Commit

Permalink
not read directly in case the reader is not drained
Browse files Browse the repository at this point in the history
Signed-off-by: raygecao <reygecao@gmain.com>
  • Loading branch information
caolei committed May 11, 2022
1 parent 48b5a4e commit c9c75e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/oras/provider.go
Expand Up @@ -70,7 +70,7 @@ func (f *fetcherReaderAt) ReadAt(p []byte, off int64) (n int, err error) {
f.rc = rc
}

n, err = f.rc.Read(p)
n, err = io.ReadFull(f.rc, p)
if err != nil {
return n, err
}
Expand Down

0 comments on commit c9c75e3

Please sign in to comment.