diff --git a/apps/dav/lib/Upload/ChunkingV2Plugin.php b/apps/dav/lib/Upload/ChunkingV2Plugin.php index d3673c6bde776..97ae51fbe380b 100644 --- a/apps/dav/lib/Upload/ChunkingV2Plugin.php +++ b/apps/dav/lib/Upload/ChunkingV2Plugin.php @@ -168,7 +168,7 @@ public function beforePut(RequestInterface $request, ResponseInterface $response [$destinationDir, $destinationName] = Uri\split($this->uploadPath); /** @var Directory $destinationParent */ $destinationParent = $this->server->tree->getNodeForPath($destinationDir); - $free = $storage->free_space($destinationParent->getInternalPath()); + $free = $destinationParent->getNode()->getFreeSpace(); $newSize = $tempTargetFile->getSize() + $additionalSize; if ($free >= 0 && ($tempTargetFile->getSize() > $free || $newSize > $free)) { throw new InsufficientStorage("Insufficient space in $this->uploadPath"); @@ -225,7 +225,7 @@ public function beforeMove($sourcePath, $destination): bool { foreach ($parts as $part) { $size += $part['Size']; } - $free = $storage->free_space($destinationParent->getInternalPath()); + $free = $destinationParent->getNode()->getFreeSpace(); if ($free >= 0 && ($size > $free)) { throw new InsufficientStorage("Insufficient space in $this->uploadPath"); }