]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use constant instead of magic number 21775/head
authorMorris Jobke <hey@morrisjobke.de>
Mon, 10 Aug 2020 13:45:03 +0000 (15:45 +0200)
committerJulius Härtl <jus@bitgrid.net>
Tue, 11 Aug 2020 06:14:03 +0000 (08:14 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/files/lib/Service/OwnershipTransferService.php

index 661f0d10431433c3e79b916c424aba03e3be0707..b04a53919ac59ceeecf9663f99dd6b7f7b29e7f4 100644 (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 && $freeSpace !== -2) {
+               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.');
                }