From 7f49492117984c6c542194dff8fc1d9a0adc7be2 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 10 Aug 2020 15:45:03 +0200 Subject: [PATCH] Use constant instead of magic number Signed-off-by: Morris Jobke --- apps/files/lib/Service/OwnershipTransferService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 467649ac16..0b0a5f9abf 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -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 && $freeSpace !== -2) { + if ($size > $freeSpace && $freeSpace !== FileInfo::SPACE_UNKNOWN) { $output->writeln('Target user does not have enough free space available.'); throw new \Exception('Execution terminated.'); }