diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-15 13:00:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-15 13:00:34 +0200 |
commit | 35e2407f1d52a507e1a1cd23a86a1fbee7492a7d (patch) | |
tree | 3ca8161285ccdcf70af036e7119193691168834c | |
parent | f882f6b551533752b20ecd8a394cbcecaad5710b (diff) | |
parent | 71992dcb186a41975d972057af2637a1142c0d6f (diff) | |
download | nextcloud-server-35e2407f1d52a507e1a1cd23a86a1fbee7492a7d.tar.gz nextcloud-server-35e2407f1d52a507e1a1cd23a86a1fbee7492a7d.zip |
Merge pull request #25101 from owncloud/cross-storage-move-updater-82
fix updating folder sizes with cross storage move
-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); |