Check if the parent is writable to check if a file is deletable

This commit is contained in:
Robin Appelman 2014-08-25 14:06:27 +02:00 committed by Lukas Reschke
parent 0d37e16499
commit ab79caf29b
1 changed files with 5 additions and 1 deletions

View File

@ -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) {