mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
in case when content is not compressed
This commit is contained in:
parent
e1f070a9a1
commit
2f03481cb2
|
@ -39,7 +39,7 @@ func DecompressData(input []byte) ([]byte, error) {
|
||||||
if IsZstdContent(input) {
|
if IsZstdContent(input) {
|
||||||
return unzstdData(input)
|
return unzstdData(input)
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("unsupported compression")
|
return input, fmt.Errorf("unsupported compression")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ungzipData(input []byte) ([]byte, error) {
|
func ungzipData(input []byte) ([]byte, error) {
|
||||||
|
|
|
@ -312,7 +312,7 @@ func readEncryptedUrl(fileUrl string, cipherKey []byte, isContentCompressed bool
|
||||||
if isContentCompressed {
|
if isContentCompressed {
|
||||||
decryptedData, err = DecompressData(decryptedData)
|
decryptedData, err = DecompressData(decryptedData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unzip decrypt %s: %v", fileUrl, err)
|
glog.V(0).Info("unzip decrypt %s: %v", fileUrl, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(decryptedData) < int(offset)+size {
|
if len(decryptedData) < int(offset)+size {
|
||||||
|
|
Loading…
Reference in a new issue