mirror of
https://github.com/nextcloud/server.git
synced 2026-05-26 19:32:28 -04:00
perf(trashbin): avoid full rescan for uncached moves
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
This commit is contained in:
parent
dc90d59e4f
commit
e7641f7e06
1 changed files with 5 additions and 1 deletions
|
|
@ -350,7 +350,11 @@ class Trashbin implements IEventListener {
|
|||
if ($inCache) {
|
||||
$trashStorage->getUpdater()->renameFromStorage($sourceStorage, $sourceInternalPath, $trashInternalPath);
|
||||
} else {
|
||||
$trashStorage->getUpdater()->update($trashInternalPath);
|
||||
$sizeDifference = $sourceInfo->getSize();
|
||||
if ($sizeDifference < 0) {
|
||||
$sizeDifference = null;
|
||||
}
|
||||
$trashStorage->getUpdater()->update($trashInternalPath, null, $sizeDifference);
|
||||
}
|
||||
} catch (CopyRecursiveException $e) {
|
||||
$moveSuccessful = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue