Use constant instead of magic number
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
3606b4a8ba
commit
7f49492117
|
@ -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.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue