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 @@ -167,6 +167,8 @@
$sourcePath
);

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

Check notice

Code scanning / Psalm

PossiblyFalseReference Note

Cannot call method getSize on possibly false value

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

Check notice

Code scanning / Psalm

PossiblyFalseReference Note

Cannot call method getSize on possibly false value

// transfer the incoming shares
if ($transferIncomingShares === true) {
Expand Down Expand Up @@ -210,6 +213,9 @@
$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 walkFiles(View $view, $path, Closure $callBack) {
Expand Down
Loading