diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-08-25 14:06:27 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-17 11:35:16 +0200 |
commit | ab79caf29bf4173e15f9dad00a206c6bb1f3999c (patch) | |
tree | 41bcd0240575dd0243e3cd907648aea15481fbab /lib | |
parent | 0d37e16499fd0bda83d4c41dfba626b3d9a489f5 (diff) | |
download | nextcloud-server-ab79caf29bf4173e15f9dad00a206c6bb1f3999c.tar.gz nextcloud-server-ab79caf29bf4173e15f9dad00a206c6bb1f3999c.zip |
Check if the parent is writable to check if a file is deletable
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/storage/common.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 4799c865142..4680971b278 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -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) { |