Skip calling IOReadCloser() method on zstd decoder for getReader()
This commit is contained in:
parent
de94c5eb49
commit
09bff1ed18
|
@ -110,9 +110,7 @@ func getReader(format string, file io.Reader) (io.Reader, error) {
|
||||||
case "zlib":
|
case "zlib":
|
||||||
return zlib.NewReader(file)
|
return zlib.NewReader(file)
|
||||||
case "zstd":
|
case "zstd":
|
||||||
decoder, err := zstd.NewReader(file)
|
return zstd.NewReader(file)
|
||||||
|
|
||||||
return decoder.IOReadCloser(), err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return io.NopCloser(file), ErrInvalidCompression
|
return io.NopCloser(file), ErrInvalidCompression
|
||||||
|
|
|
@ -17,7 +17,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
AllowedCharacters string = `^[A-z0-9.\-_]+$`
|
AllowedCharacters string = `^[A-z0-9.\-_]+$`
|
||||||
ReleaseVersion string = "4.0.2"
|
ReleaseVersion string = "4.0.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in New Issue