summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis <6653109+artonge@users.noreply.github.com>2022-11-24 16:10:11 +0100
committerGitHub <noreply@github.com>2022-11-24 16:10:11 +0100
commit6502e3c5be7efcb1428b0f8fd7558adaa6445ccb (patch)
treecb797ba5ec347fe606fb14041510c8c31e3bd9a7
parentb45c62a2cfc6cc76023c475e4acad09929c76bc9 (diff)
parent90bce5d58e76de0b0c3d9ca3a253474b82968293 (diff)
downloadnextcloud-server-6502e3c5be7efcb1428b0f8fd7558adaa6445ccb.tar.gz
nextcloud-server-6502e3c5be7efcb1428b0f8fd7558adaa6445ccb.zip
Merge pull request #35398 from nextcloud/artonge/fix/dont_error_when_destination_is_not_a_node
Do not check quota for non Node
-rw-r--r--apps/dav/lib/Connector/Sabre/QuotaPlugin.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
index 7c6bf64602e..ff7396a0825 100644
--- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
@@ -148,14 +148,14 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
public function beforeCopy(string $sourcePath, string $destinationPath): bool {
$sourceNode = $this->server->tree->getNodeForPath($sourcePath);
if (!$sourceNode instanceof Node) {
- return false;
+ return true;
}
// get target node for proper path conversion
if ($this->server->tree->nodeExists($destinationPath)) {
$destinationNode = $this->server->tree->getNodeForPath($destinationPath);
if (!$destinationNode instanceof Node) {
- return false;
+ return true;
}
$path = $destinationNode->getPath();
} else {
@@ -165,7 +165,7 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
}
$parentNode = $this->server->tree->getNodeForPath($parent);
if (!$parentNode instanceof Node) {
- return false;
+ return true;
}
$path = $parentNode->getPath();
}