Handle missing cached share mounts - #63501
Open
Sudaisib wants to merge 2 commits into
Open
Conversation
Fixes nextcloud#62545 by making CleanupShareTarget tolerate a missing recipient mount-cache entry during repair. The repair now skips cache removal when no cached mount exists and continues updating the share target. Signed-off-by: Oladosu Ibrahim <oladosuibrahim1999@gmail.com>
Sudaisib
requested review from
Altahrim,
icewind1991,
provokateurin and
salmart-dev
and removed request for
a team
August 23, 2026 04:09
Add focused coverage for repairing a share target when the recipient’s old mount-cache entry is missing, ensuring the repair completes without dereferencing a null mount. Signed-off-by: Oladosu Ibrahim <oladosuibrahim1999@gmail.com>
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.
Fixes #62545
Summary
CleanupShareTargetcan encounter a missing recipient mount-cache entry while repairing a share target. The previous code dereferenced the missing entry before updating the target, causing the repair to fail. This change treats the cached mount as optional and only rewrites the cache when the entry exists, allowing the repair to continue safely.Validation
Checklist