From 42d7a32774e452398a406cb2ad4fb9cb0dccf6a4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 14 Jun 2016 16:42:56 +0200 Subject: fix updating folder sizes with cross storage move --- lib/private/files/cache/updater.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index 1e180e7993a..1131a104f8a 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -170,6 +170,7 @@ class Updater { list($targetStorage, $targetInternalPath) = $this->view->resolvePath($target); if ($sourceStorage && $targetStorage) { + $sourceCache = $sourceStorage->getCache($sourceInternalPath); $targetCache = $targetStorage->getCache($sourceInternalPath); if ($targetCache->inCache($targetInternalPath)) { $targetCache->remove($targetInternalPath); @@ -187,7 +188,7 @@ class Updater { $targetCache->update($fileId, array('mimetype' => $mimeType)); } - $targetCache->correctFolderSize($sourceInternalPath); + $sourceCache->correctFolderSize($sourceInternalPath); $targetCache->correctFolderSize($targetInternalPath); $this->correctParentStorageMtime($sourceStorage, $sourceInternalPath); $this->correctParentStorageMtime($targetStorage, $targetInternalPath); -- cgit v1.2.3