diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-14 13:55:32 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-14 13:55:32 -0700 |
| commit | 18cda6adbb67e9963ffe21856cd152ce0333a0df (patch) | |
| tree | f2af9b629975269c7a608664eff745d9c363fabe /weed | |
| parent | 17efa361f9aa0aeed4ec751fa084ea556f748523 (diff) | |
| download | seaweedfs-18cda6adbb67e9963ffe21856cd152ce0333a0df.tar.xz seaweedfs-18cda6adbb67e9963ffe21856cd152ce0333a0df.zip | |
cleaner fix
Diffstat (limited to 'weed')
| -rw-r--r-- | weed/operation/upload_content.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index 3101dc191..6806f7cf8 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -120,11 +120,13 @@ func doUploadData(uploadUrl string, filename string, cipher bool, data []byte, i }, filename, contentIsGzipped, mtype, pairMap, jwt) } - if uploadResult != nil { - uploadResult.Size = uint32(clearDataLen) - if contentIsGzipped { - uploadResult.Gzip = 1 - } + if uploadResult == nil { + return + } + + uploadResult.Size = uint32(clearDataLen) + if contentIsGzipped { + uploadResult.Gzip = 1 } return uploadResult, err |
