From: Bjoern Schiessle Date: Mon, 4 Jun 2012 16:03:16 +0000 (+0200) Subject: don't allow user to delete Shared dir via webdav and sync client (bug #774) X-Git-Tag: v4.5.0beta1~74^2~424^2~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c6a1d9491bd859e7b97296d9f3b2d4020e89c212;p=nextcloud-server.git don't allow user to delete Shared dir via webdav and sync client (bug #774) --- diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php index 935d3b0abe4..e74d832cb00 100644 --- a/lib/connector/sabre/directory.php +++ b/lib/connector/sabre/directory.php @@ -118,8 +118,10 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa */ public function delete() { - foreach($this->getChildren() as $child) $child->delete(); - OC_Filesystem::rmdir($this->path); + if ($this->path != "/Shared") { + foreach($this->getChildren() as $child) $child->delete(); + OC_Filesystem::rmdir($this->path); + } }