Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable24] only need to setup root for groupfolders #32141

Merged
merged 1 commit into from Apr 26, 2022

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #32084

Signed-off-by: Robin Appelman <robin@icewind.nl>
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -344,7 +344,9 @@ public function setupRoot(): void {
* @return IUser|null
*/
private function getUserForPath(string $path) {
if (substr_count($path, '/') < 2) {
if (strpos($path, '/__groupfolders') === 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now thinking, we do have https://www.php.net/manual/en/function.str-starts-with.php and a polyfill now, should we start using it ? I guess it might be more performant than doing strpos as it doesn't need to search the whole string

something for later @icewind1991 @CarlSchwan

@blizzz blizzz added the 4. to release Ready to be released and/or waiting for tests to finish label Apr 26, 2022
@blizzz blizzz merged commit dd93df2 into stable24 Apr 26, 2022
@blizzz blizzz deleted the backport/32084/stable24 branch April 26, 2022 09:11
@blizzz blizzz mentioned this pull request Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish performance 🚀
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants