Skip to content

fix(dav): catch NotFound exception in UploadHome::childExists() - #57096

Merged
provokateurin merged 1 commit into
masterfrom
jtr/fix-uploadhome-childexists
Dec 15, 2025
Merged

fix(dav): catch NotFound exception in UploadHome::childExists()#57096
provokateurin merged 1 commit into
masterfrom
jtr/fix-uploadhome-childexists

Conversation

@joshtrichards

@joshtrichardsjoshtrichards commented Dec 15, 2025

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

The method never returns false for non-existence - it either returns true or throws (passes on) an exception.
This doesn't match the API contract for getChild().
The null check was meaningless since exceptions are thrown before null can be returned.

Discovered while implementing unit tests.

TODO

  • ...

Checklist

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards
joshtrichards requested a review from a team as a code ownerDecember 15, 2025 16:01
@joshtrichards
joshtrichards requested review from Altahrim, CarlSchwan, icewind1991, provokateurin and salmart-dev and removed request for a teamDecember 15, 2025 16:01
@joshtrichardsjoshtrichards added this to the Nextcloud 33 milestone Dec 15, 2025
@joshtrichards

Copy link
Copy Markdown
MemberAuthor

/backport to stable32

@joshtrichards

Copy link
Copy Markdown
MemberAuthor

/backport to stable31

@solracsfsolracsf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch

@provokateurin
provokateurin merged commit 10fa179 into masterDec 15, 2025
211 of 219 checks passed
@provokateurin
provokateurin deleted the jtr/fix-uploadhome-childexists branch December 15, 2025 19:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugfeature: dav

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@joshtrichards@solracsf@provokateurin