wusong
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
weed/mount/filehandle_read.go
|
|
@ -53,7 +53,7 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, int64, e |
|
|
|
return 0, 0, io.EOF |
|
|
|
} |
|
|
|
|
|
|
|
if offset+int64(len(buff)) <= int64(len(entry.Content)) { |
|
|
|
if offset < int64(len(entry.Content)) { |
|
|
|
totalRead := copy(buff, entry.Content[offset:]) |
|
|
|
glog.V(4).Infof("file handle read cached %s [%d,%d] %d", fileFullPath, offset, offset+int64(totalRead), totalRead) |
|
|
|
return int64(totalRead), 0, nil |
|
|
|