diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-02-20 17:08:17 +0400 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-02-20 17:08:17 +0400 |
commit | ab93d295625defcbca6cc01d1ffd9b7526e8bb6e (patch) | |
tree | e7eebee622ca18433e5aecde4bfed1268233aeab /lib | |
parent | 626b90fa84542c90d27a5533df415324d1f1c1be (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.php | 9 |
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); } /** |