Merge pull request #22729 from nextcloud/fix/object_storage_permissions_shortcut

Run stat less often for objectstorages
This commit is contained in:
Morris Jobke 2020-09-09 10:43:37 +02:00 committed by GitHub
commit d8dea5070b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -227,6 +227,16 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
}
}
public function getPermissions($path) {
$stat = $this->stat($path);
if (is_array($stat) && isset($stat['permissions'])) {
return $stat['permissions'];
}
return parent::getPermissions($path);
}
/**
* Override this method if you need a different unique resource identifier for your object storage implementation.
* The default implementations just appends the fileId to 'urn:oid:'. Make sure the URN is unique over all users.