Use constant instead of magic number

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2020-08-10 15:45:03 +02:00 committed by backportbot[bot]
parent 3606b4a8ba
commit 7f49492117
1 changed files with 1 additions and 1 deletions

View File

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