From 4bbc1cdc797974590ed4ec1c77f09eb70f490dc6 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 7 Jun 2017 16:53:37 +0200 Subject: [PATCH] more efficient permissions for s3 external storage Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/AmazonS3.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 2e343d8e46..606a6b0189 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -309,6 +309,14 @@ class AmazonS3 extends \OC\Files\Storage\Common { return false; } + public function getPermissions($path) { + $type = $this->filetype($path); + if (!$type) { + return 0; + } + return $type === 'dir' ? Constants::PERMISSION_ALL : Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE; + } + public function unlink($path) { $path = $this->normalizePath($path);