Do not exit if available space cannot be determined on file transfer

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-07-09 15:02:21 +02:00
parent 2498280801
commit cb2f5a829e
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,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 !== -2) {
$output->writeln('<error>Target user does not have enough free space available.</error>');
throw new \Exception('Execution terminated.');
}