diff options
Diffstat (limited to 'lib/private/files/cache/updater.php')
-rw-r--r-- | lib/private/files/cache/updater.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index 80ba704883e..20163487ddc 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -123,7 +123,9 @@ class Updater implements IUpdater { } else { // scanner didn't provide size info, fallback to full size calculation $sizeDifference = 0; - $this->cache->correctFolderSize($path, $data); + if ($this->cache instanceof Cache) { + $this->cache->correctFolderSize($path, $data); + } } $this->correctParentStorageMtime($path); $this->propagator->propagateChange($path, $time, $sizeDifference); @@ -145,7 +147,9 @@ class Updater implements IUpdater { } $this->cache->remove($path); - $this->cache->correctFolderSize($parent); + if ($this->cache instanceof Cache) { + $this->cache->correctFolderSize($parent); + } $this->correctParentStorageMtime($path); $this->propagator->propagateChange($path, time()); } @@ -187,8 +191,12 @@ class Updater implements IUpdater { $this->cache->update($fileId, ['mimetype' => $mimeType]); } - $sourceCache->correctFolderSize($source); - $this->cache->correctFolderSize($target); + if ($sourceCache instanceof Cache) { + $sourceCache->correctFolderSize($source); + } + if ($this->cache instanceof Cache) { + $this->cache->correctFolderSize($target); + } if ($sourceUpdater instanceof Updater) { $sourceUpdater->correctParentStorageMtime($source); } |