]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't allow user to delete Shared dir via webdav and sync client (bug #774)
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 4 Jun 2012 16:03:16 +0000 (18:03 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 4 Jun 2012 16:03:16 +0000 (18:03 +0200)
lib/connector/sabre/directory.php

index 935d3b0abe4a585acecc6c286d4c925b9853aa2e..e74d832cb00b5a0194d91eb1aae040c6f666544a 100644 (file)
@@ -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);
+               }
 
        }