aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-10 15:45:03 +0200
committerJulius Härtl <jus@bitgrid.net>2020-08-11 08:14:03 +0200
commit4e297d7a977c7129039246dfc9e78e882a5bf465 (patch)
tree67aa32fc889e715a38f8bac3e01d3d22d9e976df /apps/files
parentcb2f5a829e6791854433a1a39399ec1bc18f0b8f (diff)
downloadnextcloud-server-4e297d7a977c7129039246dfc9e78e882a5bf465.tar.gz
nextcloud-server-4e297d7a977c7129039246dfc9e78e882a5bf465.zip
Use constant instead of magic number
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Service/OwnershipTransferService.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php
index 661f0d10431..b04a53919ac 100644
--- a/apps/files/lib/Service/OwnershipTransferService.php
+++ b/apps/files/lib/Service/OwnershipTransferService.php
@@ -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.');
}