Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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("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.");
}
}

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