Skip to content

Commit

Permalink
feat: improve occ file:transfer-ownership logging
Browse files Browse the repository at this point in the history
Signed-off-by: grnd-alt <[email protected]>
  • Loading branch information
grnd-alt committed Feb 11, 2025
1 parent 277418c commit a1fd916
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/files/lib/Service/OwnershipTransferService.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ public function transfer(
$sourcePath
);

$sourceSize = $view->getFileInfo($sourcePath)->getSize();

// transfer the files
$this->transferFiles(
$sourceUid,
Expand All @@ -149,6 +151,7 @@ public function transfer(
$view,
$output
);
$sizeDifference = $sourceSize - $view->getFileInfo($finalTarget)->getSize();

// transfer the incoming shares
if ($transferIncomingShares === true) {
Expand Down Expand Up @@ -184,6 +187,9 @@ public function transfer(
$shares,
$output
);
if ($sizeDifference !== 0) {
$output->writeln("Not everything was transferred, folders have a size difference of: $sizeDifference Bytes");
}
}

private function sanitizeFolderName(string $name): string {
Expand Down

0 comments on commit a1fd916

Please sign in to comment.