]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use constant instead of magic number 22182/head
authorMorris Jobke <hey@morrisjobke.de>
Mon, 10 Aug 2020 13:45:03 +0000 (15:45 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 11 Aug 2020 09:21:02 +0000 (09:21 +0000)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/files/lib/Service/OwnershipTransferService.php

index 333862571c9b4bf45f78e6226efc2a07269013ce..f47128a8d9f584f7db89686133962fb555c3b0f8 100644 (file)
@@ -190,7 +190,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.');
                }