mirror of
https://github.com/rclone/rclone.git
synced 2024-11-29 03:48:27 +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) {
|
if os.IsNotExist(err) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
c.updateUsed()
|
||||||
c.mu.Lock()
|
c.mu.Lock()
|
||||||
oldItems, oldUsed := len(c.item), fs.SizeSuffix(c.used)
|
oldItems, oldUsed := len(c.item), fs.SizeSuffix(c.used)
|
||||||
c.mu.Unlock()
|
c.mu.Unlock()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user