Browse Source

a bit optimization

pull/6214/head
chrislu 2 months ago
parent
commit
6161d0b05d
  1. 2
      weed/mount/filehandle_read.go

2
weed/mount/filehandle_read.go

@ -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

Loading…
Cancel
Save