summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/directory.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-09-22 12:19:34 +0200
committerVincent Petry <pvince81@owncloud.com>2014-09-22 13:15:17 +0200
commit470c25eff49c38cb1a3ffbb2b0ce4007093bf26e (patch)
tree650b07ad4ceec034fbc58381a6f9874c2371eab8 /lib/private/connector/sabre/directory.php
parent61bb19eff03d28b3725a6ab4841b4c54b9517576 (diff)
downloadnextcloud-server-470c25eff49c38cb1a3ffbb2b0ce4007093bf26e.tar.gz
nextcloud-server-470c25eff49c38cb1a3ffbb2b0ce4007093bf26e.zip
WebDAV now throws 403 when deletion did not work
Assume a permission issue whenever a file could not be deleted. This is because some storages are not able to return permissions, so a permission denied situation can only be triggered during direct deletion.
Diffstat (limited to 'lib/private/connector/sabre/directory.php')
-rw-r--r--lib/private/connector/sabre/directory.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php
index 9cd7c553f0b..597fbdae0cc 100644
--- a/lib/private/connector/sabre/directory.php
+++ b/lib/private/connector/sabre/directory.php
@@ -192,7 +192,10 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
throw new \Sabre\DAV\Exception\Forbidden();
}
- $this->fileView->rmdir($this->path);
+ if (!$this->fileView->rmdir($this->path)) {
+ // assume it wasn't possible to remove due to permission issue
+ throw new \Sabre\DAV\Exception\Forbidden();
+ }
}