Skip to content

Commit

Permalink
Do not check quota for non Node
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge authored and backportbot-nextcloud[bot] committed Nov 24, 2022
1 parent f1a43e3 commit 97dbec0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/dav/lib/Connector/Sabre/QuotaPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ public function beforeMove($source, $destination) {
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 {
Expand All @@ -165,7 +165,7 @@ public function beforeCopy(string $sourcePath, string $destinationPath): bool {
}
$parentNode = $this->server->tree->getNodeForPath($parent);
if (!$parentNode instanceof Node) {
return false;
return true;
}
$path = $parentNode->getPath();
}
Expand Down

0 comments on commit 97dbec0

Please sign in to comment.