summaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre/directory.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-06-04 18:03:16 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-06-04 18:03:16 +0200
commitc6a1d9491bd859e7b97296d9f3b2d4020e89c212 (patch)
tree51981dd3cad2bfe61d474e4ec93d2ee0ecd36838 /lib/connector/sabre/directory.php
parentf291a843bf1258a71943aca824c281540c636c1c (diff)
downloadnextcloud-server-c6a1d9491bd859e7b97296d9f3b2d4020e89c212.tar.gz
nextcloud-server-c6a1d9491bd859e7b97296d9f3b2d4020e89c212.zip
don't allow user to delete Shared dir via webdav and sync client (bug #774)
Diffstat (limited to 'lib/connector/sabre/directory.php')
-rw-r--r--lib/connector/sabre/directory.php6
1 files changed, 4 insertions, 2 deletions
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);
+ }
}