[Pkg-owncloud-commits] [owncloud] 12/58: Properly handle NotPermittedException in SabreDAV
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 15:58:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.6
in repository owncloud.
commit 0d9ad1416571b1e73f590b784dbd7320e75bb0cb
Author: Morris Jobke <hey at morrisjobke.de>
Date: Thu Jul 2 10:47:54 2015 +0200
Properly handle NotPermittedException in SabreDAV
---
lib/private/connector/sabre/file.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index e57d04f..0831bb3 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list