aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-06-07 16:53:37 +0200
committerRobin Appelman <robin@icewind.nl>2017-09-18 15:16:27 +0200
commit4bbc1cdc797974590ed4ec1c77f09eb70f490dc6 (patch)
tree8eb07750e5be4a99af722343afd683313c7952b6
parent9b5accf9f369d53f085e42f139d879b2f4002f74 (diff)
downloadnextcloud-server-4bbc1cdc797974590ed4ec1c77f09eb70f490dc6.tar.gz
nextcloud-server-4bbc1cdc797974590ed4ec1c77f09eb70f490dc6.zip
more efficient permissions for s3 external storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--apps/files_external/lib/Lib/Storage/AmazonS3.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php
index 2e343d8e469..606a6b0189a 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);