FUSE mount: fix file id written twice?

fix https://github.com/chrislusf/seaweedfs/issues/1373
This commit is contained in:
Chris Lu
2020-06-25 20:11:49 -07:00
parent 212c64241b
commit 3cec4b3c49
3 changed files with 8 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ func (c *ChunkCache) doGetChunk(fileId string, chunkSize uint64) (data []byte) {
for _, diskCache := range c.diskCaches {
data := diskCache.getChunk(fid.Key)
if len(data) != 0 {
if len(data) != 0 && len(data) >= int(chunkSize) {
return data
}
}