mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-29 08:20:42 +01:00
a bit optimization
This commit is contained in:
1 parent
98b519b113
commit
6161d0b05d
1 file changed
+2
@@ -47,6 +47,8 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, int64, e
|
||||
if fileSize == 0 {
|
||||
glog.V(1).Infof("empty fh %v", fileFullPath)
|
||||
return 0, 0, io.EOF
|
||||
} else if offset == fileSize {
|
||||
return 0, 0, io.EOF
|
||||
} else if offset >= fileSize {
|
||||
glog.V(1).Infof("invalid read, fileSize %d, offset %d for %s", fileSize, offset, fileFullPath)
|
||||
return 0, 0, io.EOF
|
||||
|
||||
Reference in new issue
Block a user