more efficient permissions for s3 external storage

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-06-07 16:53:37 +02:00
parent f45a7a43df
commit a0848ba202
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
1 changed files with 8 additions and 0 deletions

View File

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