diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-05-24 23:19:56 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-05-24 23:19:56 -0700 |
| commit | e18c7e160c075b44d2982e452cf4882ba0bfe895 (patch) | |
| tree | 82211e61206529f7e5efaf81c65a3148bca3cf18 /weed/filer2/filechunks.go | |
| parent | d773e11c7a65903b3ee1adea801a20f91cb0c7aa (diff) | |
| download | seaweedfs-e18c7e160c075b44d2982e452cf4882ba0bfe895.tar.xz seaweedfs-e18c7e160c075b44d2982e452cf4882ba0bfe895.zip | |
avoid empty chunk view
Diffstat (limited to 'weed/filer2/filechunks.go')
| -rw-r--r-- | weed/filer2/filechunks.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/filer2/filechunks.go b/weed/filer2/filechunks.go index 6bdfbd48e..5877f2f71 100644 --- a/weed/filer2/filechunks.go +++ b/weed/filer2/filechunks.go @@ -66,7 +66,7 @@ func ReadFromChunks(chunks []*filer_pb.FileChunk, offset int64, size int) (views stop := offset + int64(size) for _, chunk := range visibles { - if chunk.start <= offset && offset < chunk.stop { + if chunk.start <= offset && offset < chunk.stop && offset < stop { views = append(views, &ChunkView{ FileId: chunk.fileId, Offset: offset - chunk.start, // offset is the data starting location in this file id |
