diff options
| author | tnextday <fw2k4@163.com> | 2015-12-02 16:35:16 +0800 |
|---|---|---|
| committer | tnextday <fw2k4@163.com> | 2015-12-02 16:35:16 +0800 |
| commit | d0e2475ecea97ac96ddbdc76f98a5de32e4a68ad (patch) | |
| tree | 1975074bc84c01a5179edc517ffd46b3e40c0a6e /go/operation/chunked_file.go | |
| parent | 2c0a7fe75e1e3c1a0f04ab22414d3054a3095078 (diff) | |
| download | seaweedfs-d0e2475ecea97ac96ddbdc76f98a5de32e4a68ad.tar.xz seaweedfs-d0e2475ecea97ac96ddbdc76f98a5de32e4a68ad.zip | |
`FilePart.Upload` use base name instead of full path
fix chunked file download error
Diffstat (limited to 'go/operation/chunked_file.go')
| -rw-r--r-- | go/operation/chunked_file.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/go/operation/chunked_file.go b/go/operation/chunked_file.go index 0492d39a7..0e455e93a 100644 --- a/go/operation/chunked_file.go +++ b/go/operation/chunked_file.go @@ -22,9 +22,9 @@ var ( ) type ChunkInfo struct { - Fid string `json:"fid,omitempty"` - Offset int64 `json:"offset,omitempty"` - Size int64 `json:"size,omitempty"` + Fid string `json:"fid"` + Offset int64 `json:"offset"` + Size int64 `json:"size"` } type ChunkList []*ChunkInfo @@ -52,7 +52,7 @@ func (s ChunkList) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func LoadChunkedManifest(buffer []byte) (*ChunkManifest, error) { cm := ChunkManifest{} - if e := json.Unmarshal(buffer, cm); e != nil { + if e := json.Unmarshal(buffer, &cm); e != nil { return nil, e } sort.Sort(cm.Chunks) |
