mirror of
https://github.com/rclone/rclone.git
synced 2025-01-08 07:20:42 +01: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
43ad7b10a2
commit
e76963a971
@ -609,6 +609,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