mirror of
https://github.com/nextcloud/server.git
synced 2026-03-15 07:03:16 -04:00
Merge pull request #51561 from nextcloud/backport/50663/stable31
[stable31] enh: improve occ file:transfer-ownership logging
This commit is contained in:
commit
957ffda3cb
1 changed files with 6 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue