summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/decoder.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-10 14:51:29 +0000
committerGitHub <noreply@github.com>2021-08-10 14:51:29 +0000
commit859ffb40ae839007ed7fe673312d39177d12244a (patch)
tree15de14be5303271867bec3aca8ff440268f53dc5 /vendor/github.com/klauspost/compress/zstd/decoder.go
parent904e0f20e1aa2662138267f16d0730d9ae2c69a3 (diff)
parentf7de8bc8096f3dfdf25a4b08b0b933a43192218c (diff)
downloadpodman-859ffb40ae839007ed7fe673312d39177d12244a.tar.gz
podman-859ffb40ae839007ed7fe673312d39177d12244a.tar.bz2
podman-859ffb40ae839007ed7fe673312d39177d12244a.zip
Merge pull request #11178 from containers/dependabot/go_modules/github.com/containers/storage-1.34.0
Bump github.com/containers/storage from 1.33.1 to 1.34.0
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/decoder.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/decoder.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/decoder.go b/vendor/github.com/klauspost/compress/zstd/decoder.go
index 4d984c3b2..f430f58b5 100644
--- a/vendor/github.com/klauspost/compress/zstd/decoder.go
+++ b/vendor/github.com/klauspost/compress/zstd/decoder.go
@@ -260,9 +260,10 @@ func (d *Decoder) WriteTo(w io.Writer) (int64, error) {
if len(d.current.b) > 0 {
n2, err2 := w.Write(d.current.b)
n += int64(n2)
- if err2 != nil && d.current.err == nil {
+ if err2 != nil && (d.current.err == nil || d.current.err == io.EOF) {
d.current.err = err2
- break
+ } else if n2 != len(d.current.b) {
+ d.current.err = io.ErrShortWrite
}
}
if d.current.err != nil {