]> 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)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 11 Aug 2020 09:20:56 +0000 (09:20 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/lib/Service/OwnershipTransferService.php

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