aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2024-12-02 12:56:02 +0100
committerLouis Chemineau <louis@chmn.me>2024-12-05 10:48:30 +0100
commit3497725235857a52fab32634aef6bf725a57dcb9 (patch)
tree69c605da9748b5b6f34fbb28b1aab47a114579ac /apps
parent3b6920fa81b56965752e7c4780f730049b6d9489 (diff)
downloadnextcloud-server-3497725235857a52fab32634aef6bf725a57dcb9.tar.gz
nextcloud-server-3497725235857a52fab32634aef6bf725a57dcb9.zip
fix: Throw exception when copy failedbackport/49293/stable30
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/Directory.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php
index d56f56890cc..8f637455403 100644
--- a/apps/dav/lib/Connector/Sabre/Directory.php
+++ b/apps/dav/lib/Connector/Sabre/Directory.php
@@ -445,7 +445,13 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol
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('Copy did not proceed');
+ }
+
+ return true;
} catch (StorageNotAvailableException $e) {
throw new ServiceUnavailable($e->getMessage(), $e->getCode(), $e);
} catch (ForbiddenException $ex) {