Skip to content

[stable33] fix(files_external): clean up filecache when deleting an external storage - #67766

Draft
backportbot[bot] wants to merge 1 commit into
stable33from
backport/64173/stable33
Draft

backportbot[bot] wants to merge 1 commit into
stable33from
backport/64173/stable33

Conversation

@backportbot

@backportbot backportbot Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

Backport of #64173

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

…rage

StoragesService::removeStorage() dispatched StorageDeletedEvent before
Storage::cleanByMountId(). MountCacheService handles that event by
removing the storage's oc_mounts rows, and cleanByMountId() looks the
storages up through those rows, so it found nothing and left the
oc_filecache and oc_storages rows behind. occ files:cleanup cannot
recover them because the oc_storages row still exists.

Dispatch the event after the cleanup, which restores the order used
before the event was introduced.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Assisted-by: ClaudeCode:claude-opus-5-5

[skip ci]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant