Check if the parent is writable to check if a file is deletable
This commit is contained in:
parent
0d37e16499
commit
ab79caf29b
1 changed files with 5 additions and 1 deletions
|
@ -95,7 +95,11 @@ abstract class Common implements \OC\Files\Storage\Storage {
|
|||
}
|
||||
|
||||
public function isDeletable($path) {
|
||||
return $this->isUpdatable($path);
|
||||
if ($path === '' or $path === '/') {
|
||||
return false;
|
||||
}
|
||||
$parent = dirname($path);
|
||||
return $this->isUpdatable($parent);
|
||||
}
|
||||
|
||||
public function isSharable($path) {
|
||||
|
|
Loading…
Reference in a new issue