Skip to content

fix(files): keep deleting live photo peers after a missing one - #64690

Merged
solracsf merged 1 commit into
masterfrom
fix/live-photos-missing-peer
Sep 23, 2026
Merged

solracsf merged 1 commit into
masterfrom
fix/live-photos-missing-peer

Conversation

@solracsf

@solracsf solracsf commented Sep 23, 2026 •

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

SyncLivePhotosListener::handleCacheEntriesRemovedEvent() deletes the peer file for every removed live photo in a batch, but it returned as soon as one peer could not be found in the user's folder instead of continueing to the next one. Any peer after the missing one in the same batch was left behind.

This happens when both halves of a live photo are inside the removed tree: by the time the loop reaches the second half's id, the first one is already gone from the folder, getFirstNodeById() returns null, and the loop stops there.

Found while looking into #64661, but unrelated to that issue's chunking problem.

Checklist

AI (if applicable)

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

handleCacheEntriesRemovedEvent() returned from the loop as soon as one
peer could not be found, so every remaining peer in the same batch was
left behind. This happens whenever both halves of a live photo are in
the removed tree, since the first half is already gone when its peer id
is looked up.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf
solracsf requested a review from a team as a code owner September 23, 2026 14:07
@solracsf
solracsf requested review from CarlSchwan, leftybournes, salmart-dev and sorbaugh and removed request for a team September 23, 2026 14:07
@solracsf solracsf added this to the Nextcloud 36 milestone Sep 23, 2026
@solracsf solracsf added bug 3. to review Waiting for reviews labels Sep 23, 2026
@solracsf solracsf self-assigned this Sep 23, 2026
@solracsf

Copy link
Copy Markdown
Member Author

/backport to stable35

@solracsf

Copy link
Copy Markdown
Member Author

/backport to stable34

@solracsf

Copy link
Copy Markdown
Member Author

/backport to stable33

@solracsf
solracsf merged commit a4bd8e5 into master Sep 23, 2026
210 of 213 checks passed
@solracsf
solracsf deleted the fix/live-photos-missing-peer branch September 23, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants