mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-18 19:07:55 +08:00
filer: skip resizing image if width or height larger than original image
fix https://github.com/chrislusf/seaweedfs/issues/1239#issuecomment-602140779
This commit is contained in:
@@ -142,11 +142,11 @@ func NewChunkedFileReader(chunkList []*ChunkInfo, master string) *ChunkedFileRea
|
||||
func (cf *ChunkedFileReader) Seek(offset int64, whence int) (int64, error) {
|
||||
var err error
|
||||
switch whence {
|
||||
case 0:
|
||||
case 1:
|
||||
case io.SeekStart:
|
||||
case io.SeekCurrent:
|
||||
offset += cf.pos
|
||||
case 2:
|
||||
offset = cf.totalSize - offset
|
||||
case io.SeekEnd:
|
||||
offset = cf.totalSize + offset
|
||||
}
|
||||
if offset > cf.totalSize {
|
||||
err = ErrInvalidRange
|
||||
|
Reference in New Issue
Block a user