Skip to content

Commit 6502e3c

Browse files
authored
Merge pull request #35398 from nextcloud/artonge/fix/dont_error_when_destination_is_not_a_node
Do not check quota for non Node
2 parents b45c62a + 90bce5d commit 6502e3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/dav/lib/Connector/Sabre/QuotaPlugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ public function beforeMove($source, $destination) {
148148
public function beforeCopy(string $sourcePath, string $destinationPath): bool {
149149
$sourceNode = $this->server->tree->getNodeForPath($sourcePath);
150150
if (!$sourceNode instanceof Node) {
151-
return false;
151+
return true;
152152
}
153153

154154
// get target node for proper path conversion
155155
if ($this->server->tree->nodeExists($destinationPath)) {
156156
$destinationNode = $this->server->tree->getNodeForPath($destinationPath);
157157
if (!$destinationNode instanceof Node) {
158-
return false;
158+
return true;
159159
}
160160
$path = $destinationNode->getPath();
161161
} else {
@@ -165,7 +165,7 @@ public function beforeCopy(string $sourcePath, string $destinationPath): bool {
165165
}
166166
$parentNode = $this->server->tree->getNodeForPath($parent);
167167
if (!$parentNode instanceof Node) {
168-
return false;
168+
return true;
169169
}
170170
$path = $parentNode->getPath();
171171
}

0 commit comments

Comments
 (0)