Browse Source

Prevent deleting Webdav root

tags/v8.1RC2
Vincent Petry 9 years ago
parent
commit
6ae5ae2e31
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/private/connector/sabre/directory.php

+ 1
- 1
lib/private/connector/sabre/directory.php View File

@@ -230,7 +230,7 @@ class Directory extends \OC\Connector\Sabre\Node
*/
public function delete() {

if (!$this->info->isDeletable()) {
if ($this->path === '' || $this->path === '/' || !$this->info->isDeletable()) {
throw new \Sabre\DAV\Exception\Forbidden();
}


Loading…
Cancel
Save