[Pkg-owncloud-commits] [owncloud] 43/66: don't send delete for every single file if a folder gets deleted

David Prévot taffit at moszumanska.debian.org
Fri Apr 18 22:49:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v5.0.15
in repository owncloud.

commit ab93d295625defcbca6cc01d1ffd9b7526e8bb6e
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Thu Feb 20 14:08:17 2014 +0100

    don't send delete for every single file if a folder gets deleted
---
 lib/connector/sabre/directory.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index 3cccf6e..6d386d3 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);
 	}
 
 	/**

-- 
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