summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-07-02 10:47:54 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-02 10:47:54 +0200
commit0d9ad1416571b1e73f590b784dbd7320e75bb0cb (patch)
tree8f4fa5517171528cd868282ef1353100d29a78aa /lib
parent78dc8ca702903b07dbc02746bebcb96169558610 (diff)
downloadnextcloud-server-0d9ad1416571b1e73f590b784dbd7320e75bb0cb.tar.gz
nextcloud-server-0d9ad1416571b1e73f590b784dbd7320e75bb0cb.zip
Properly handle NotPermittedException in SabreDAV
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/file.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index e57d04f9a6e..0831bb374d5 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -142,6 +142,10 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
throw new \Sabre\DAV\Exception('Could not rename part file to final file');
}
}
+ catch (\OCP\Files\NotPermittedException $e) {
+ // a more general case - due to whatever reason the content could not be written
+ throw new \Sabre\DAV\Exception\Forbidden($e->getMessage(), $e->getCode(), $e);
+ }
catch (\OCP\Files\LockNotAcquiredException $e) {
// the file is currently being written to by another process
throw new OC_Connector_Sabre_Exception_FileLocked($e->getMessage(), $e->getCode(), $e);