Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-02-20 17:08:17 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2014-02-20 17:08:17 +0400
commitab93d295625defcbca6cc01d1ffd9b7526e8bb6e (patch)
treee7eebee622ca18433e5aecde4bfed1268233aeab /lib
parent626b90fa84542c90d27a5533df415324d1f1c1be (diff)
don't send delete for every single file if a folder gets deleted
Diffstat (limited to 'lib')
-rw-r--r--lib/connector/sabre/directory.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index 3cccf6ef3d0..6d386d35fb1 100644
--- a/lib/connector/sabre/directory.php
+++ b/lib/connector/sabre/directory.php
@@ -225,14 +225,15 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
*/
public function delete() {
- if (!\OC\Files\Filesystem::isDeletable($this->path)) {
+ if ($this->path === '/Shared') {
throw new \Sabre_DAV_Exception_Forbidden();
}
- if ($this->path != "/Shared") {
- foreach($this->getChildren() as $child) $child->delete();
- \OC\Files\Filesystem::rmdir($this->path);
+
+ if (!\OC\Files\Filesystem::isDeletable($this->path)) {
+ throw new \Sabre_DAV_Exception_Forbidden();
}
+ \OC\Files\Filesystem::rmdir($this->path);
}
/**