Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Fix asset meta file not being deleted with asset #9300

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

duncanmcclean
Copy link
Member

This pull request fixes an issue where an asset's .meta file would not be deleted when the asset itself was deleted.

Although the meta file was actually deleted, it was shortly after being re-created by the UpdateAssetReferences listener which calls the getOriginal() method on the Asset, which ended up calling meta() and because of a meta file not being found for the asset, it created one.

This PR attempts to fix that issue by checking if the asset itself actually exists before writing the meta file to disk. If one doesn't exist, it'll now just return an empty meta array.

Fixes #7042.

@duncanmcclean duncanmcclean marked this pull request as ready for review January 10, 2024 15:59
@jasonvarga jasonvarga merged commit b53e4b5 into 4.x Jan 10, 2024
35 checks passed
@jasonvarga jasonvarga deleted the fix/asset-meta-file-not-being-deleted-alongside-asset branch January 10, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting assets in subfolders via CP doesn't delete the corresponding .meta yaml files.
2 participants