mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 08:29:10 -05:00
Merge pull request #51559 from nextcloud/backport/50663/stable29
[stable29] enh: improve occ file:transfer-ownership logging
This commit is contained in:
commit
56ee6bd012
1 changed files with 6 additions and 0 deletions
|
|
@ -167,6 +167,8 @@ class OwnershipTransferService {
|
|||
$sourcePath
|
||||
);
|
||||
|
||||
$sourceSize = $view->getFileInfo($sourcePath)->getSize();
|
||||
|
||||
// transfer the files
|
||||
$this->transferFiles(
|
||||
$sourceUid,
|
||||
|
|
@ -175,6 +177,7 @@ class OwnershipTransferService {
|
|||
$view,
|
||||
$output
|
||||
);
|
||||
$sizeDifference = $sourceSize - $view->getFileInfo($finalTarget)->getSize();
|
||||
|
||||
// transfer the incoming shares
|
||||
if ($transferIncomingShares === true) {
|
||||
|
|
@ -210,6 +213,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 walkFiles(View $view, $path, Closure $callBack) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue