]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not exit if available space cannot be determined on file transfer
authorJulius Härtl <jus@bitgrid.net>
Thu, 9 Jul 2020 13:02:21 +0000 (15:02 +0200)
committerJulius Härtl <jus@bitgrid.net>
Tue, 11 Aug 2020 06:14:03 +0000 (08:14 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/lib/Service/OwnershipTransferService.php

index 535822b999c0beea2dc835723e79cceb204d4ffb..661f0d10431433c3e79b916c424aba03e3be0707 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) {
+               if ($size > $freeSpace && $freeSpace !== -2) {
                        $output->writeln('<error>Target user does not have enough free space available.</error>');
                        throw new \Exception('Execution terminated.');
                }