Skip to content

Commit

Permalink
fix: Properly return copy status in DAV
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Nov 26, 2024
1 parent 5b01166 commit 43ed165
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/dav/lib/Connector/Sabre/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ public function copyInto($targetName, $sourcePath, INode $sourceNode) {
throw new InvalidPath($ex->getMessage());
}

return $this->fileView->copy($sourcePath, $destinationPath);
$copyOkay = $this->fileView->copy($sourcePath, $destinationPath);
if (!$copyOkay) {
throw new \Sabre\DAV\Exception\Forbidden('');
}
} catch (StorageNotAvailableException $e) {
throw new ServiceUnavailable($e->getMessage(), $e->getCode(), $e);
} catch (ForbiddenException $ex) {
Expand All @@ -457,7 +460,7 @@ public function copyInto($targetName, $sourcePath, INode $sourceNode) {
}
}

return false;
return true;
}

public function getNode(): Folder {
Expand Down

0 comments on commit 43ed165

Please sign in to comment.