mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 09:41:44 +08:00
vfs: Add a missed update of used cache space
The missed update can cause incorrect before-cleaning cache stats and a pre-mature condition broadcast in purgeOld before the cache space use is reduced below the quota.
This commit is contained in:
parent
2295123cad
commit
c5c56cda02
|
@ -610,6 +610,7 @@ func (c *Cache) clean(removeCleanFiles bool) {
|
|||
if os.IsNotExist(err) {
|
||||
return
|
||||
}
|
||||
c.updateUsed()
|
||||
c.mu.Lock()
|
||||
oldItems, oldUsed := len(c.item), fs.SizeSuffix(c.used)
|
||||
c.mu.Unlock()
|
||||
|
|
Loading…
Reference in New Issue
Block a user