occ commands for listing and refreshing mounts#56447
Merged
icewind1991 merged 2 commits intomasterfrom Nov 18, 2025
Merged
Conversation
8ca315e to
59fa307
Compare
artonge
approved these changes
Nov 15, 2025
| $mounts = $this->mountProviderCollection->getMountsForUser($user); | ||
| $mounts[] = $this->mountProviderCollection->getHomeMountForUser($user); | ||
| /** @var array<string, IMountPoint> $cachedByMountpoint */ | ||
| $mountsByMountpoint = array_combine(array_map(fn (IMountPoint $mount) => $mount->getMountPoint(), $mounts), $mounts); |
Contributor
There was a problem hiding this comment.
Will this override mounts that target the same mount points?
Should we make it so that "duplicate" mounts are displayed?
Contributor
There was a problem hiding this comment.
Ah, seems like later, you output all the mounts, and cachedMounts, which answers my question :).
But then, could there be a conflict, if two mounts target the same mountPoints, then in the for loops, one cachedMount will win and be displayed for two different mounts?
Member
Author
There was a problem hiding this comment.
cachedMounts are unique by mountpoint
2 tasks
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
59fa307 to
ef5e014
Compare
come-nc
approved these changes
Nov 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add commands to list mounts (both cached and provided) and command to refresh the cached mounts for a user.
primarily intended for helping during authoritative mountpoint debugging, but might be useful outside of it.