diff options
-rw-r--r-- | lib/private/files/cache/updater.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index c687d190873..a883d1569e2 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -189,8 +189,9 @@ class Updater { list($targetStorage, $targetInternalPath) = $this->view->resolvePath($target); if ($sourceStorage && $targetStorage) { - $targetCache = $targetStorage->getCache($sourceInternalPath); - if ($sourceStorage->getCache($sourceInternalPath)->inCache($sourceInternalPath)) { + $sourceCache = $sourceStorage->getCache($sourceInternalPath); + $targetCache = $targetStorage->getCache($targetInternalPath); + if ($sourceCache->inCache($sourceInternalPath)) { if ($targetCache->inCache($targetInternalPath)) { $targetCache->remove($targetInternalPath); } @@ -208,7 +209,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); |