Merge pull request #22181 from nextcloud/backport/21775/stable19

[stable19] Do not exit if available space cannot be determined on file transfer
This commit is contained in:
Roeland Jago Douma 2020-08-13 05:21:52 +02:00 committed by GitHub
commit 1d123c0ccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ class OwnershipTransferService {
$output->writeln('Validating quota');
$size = $view->getFileInfo($sourcePath, false)->getSize(false);
$freeSpace = $view->free_space($destinationUid . '/files/');
if ($size > $freeSpace) {
if ($size > $freeSpace && $freeSpace !== FileInfo::SPACE_UNKNOWN) {
$output->writeln('<error>Target user does not have enough free space available.</error>');
throw new \Exception('Execution terminated.');
}