Skip to content

Commit

Permalink
Merge pull request #22729 from nextcloud/fix/object_storage_permissio…
Browse files Browse the repository at this point in the history
…ns_shortcut

Run stat less often for objectstorages
  • Loading branch information
MorrisJobke authored Sep 9, 2020
2 parents 0485e68 + 9fdeed8 commit d8dea50
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/private/Files/ObjectStore/ObjectStoreStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,16 @@ public function stat($path) {
}
}

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.
Expand Down

0 comments on commit d8dea50

Please sign in to comment.