Skip to content

Commit ae1d66f

Browse files
grnd-altbackportbot[bot]
authored andcommitted
feat: improve occ file:transfer-ownership logging
Signed-off-by: grnd-alt <github@belakkaf.net>
1 parent 10376eb commit ae1d66f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/files/lib/Service/OwnershipTransferService.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ public function transfer(
141141
$sourcePath
142142
);
143143

144+
$sourceSize = $view->getFileInfo($sourcePath)->getSize();
145+
144146
// transfer the files
145147
$this->transferFiles(
146148
$sourceUid,
@@ -149,6 +151,7 @@ public function transfer(
149151
$view,
150152
$output
151153
);
154+
$sizeDifference = $sourceSize - $view->getFileInfo($finalTarget)->getSize();
152155

153156
// transfer the incoming shares
154157
if ($transferIncomingShares === true) {
@@ -184,6 +187,9 @@ public function transfer(
184187
$shares,
185188
$output
186189
);
190+
if ($sizeDifference !== 0) {
191+
$output->writeln("Transferred folder have a size difference of: $sizeDifference Bytes which means the transfer may be incomplete. Please check the logs if there was any issue during the transfer operation.");
192+
}
187193
}
188194

189195
private function sanitizeFolderName(string $name): string {

0 commit comments

Comments
 (0)