mount: fix

fix bug found by git bisect, but I do not understand why it can cause error!
This commit is contained in:
Chris Lu 2020-04-12 03:34:36 -07:00
parent 1c2e920fa2
commit 94e35cdb35

View file

@ -90,9 +90,7 @@ func (c *ChunkCache) SetChunk(fileId string, data []byte) {
c.Lock() c.Lock()
defer c.Unlock() defer c.Unlock()
if existingData := c.doGetChunk(fileId); len(existingData)==0{ c.doSetChunk(fileId, data)
c.doSetChunk(fileId, data)
}
} }
func (c *ChunkCache) doSetChunk(fileId string, data []byte) { func (c *ChunkCache) doSetChunk(fileId string, data []byte) {