Skip to content

Fix handling of storage that has multiple shared mounts - #271

Open
christoph-bessei wants to merge 2 commits into
nextcloud:mainfrom
christoph-bessei:bugfix/#254_resolve-file-from-accessible-mount
Open

Fix handling of storage that has multiple shared mounts#271
christoph-bessei wants to merge 2 commits into
nextcloud:mainfrom
christoph-bessei:bugfix/#254_resolve-file-from-accessible-mount

Conversation

@christoph-bessei

@christoph-bessei christoph-bessei commented Aug 24, 2026

Copy link
Copy Markdown

Fixes #254

Description

As described in #254 there are some edge cases where $mounts[0]->getUser()->getUID() returns a user ID that has no access to a given file. This PR fixes this by iterating through the mounts until it finds a user with access to the given file.

There might be cleaner solutions, but I wanted to reduce the changes as much as possible for an easier review. Assuming $mounts[0] is working in most cases, the performance impact should be minimal.

Notes

  • This is my first PR related to Nextcloud. Please let me know if I missed something that's required before merge.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…le shared mounts

Signed-off-by: Christoph Bessei <28066477+christoph-bessei@users.noreply.github.com>
…le shared mounts

Signed-off-by: Christoph Bessei <28066477+christoph-bessei@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embedding files can fail, when storage has multiple shared mounts

1 participant