feat: improve occ file:transfer-ownership logging

Signed-off-by: grnd-alt <github@belakkaf.net>
This commit is contained in:
grnd-alt 2025-02-05 13:08:39 +01:00 committed by Andy Scherzinger
parent 27e1a48426
commit 5a44597abb

View file

@ -141,6 +141,8 @@ class OwnershipTransferService {
$sourcePath
);
$sourceSize = $view->getFileInfo($sourcePath)->getSize();
// transfer the files
$this->transferFiles(
$sourceUid,
@ -149,6 +151,7 @@ class OwnershipTransferService {
$view,
$output
);
$sizeDifference = $sourceSize - $view->getFileInfo($finalTarget)->getSize();
// transfer the incoming shares
if ($transferIncomingShares === true) {
@ -184,6 +187,9 @@ class OwnershipTransferService {
$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 {