mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2378] [MERGED] Delete sprite directories when a character or persona is deleted #5567
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5567
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2378
Author: @Romuromylus
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Romuromylus
Base:
refactor← Head:fix/sprite-dir-delete-leak📝 Commits (2)
70f0465Delete sprite directories when a character or persona is deleted294a4efDecouple sprite delete cleanup from legacy migration📊 Changes
3 files changed (+107 additions, -3 deletions)
View changed files
📝
src-tauri/src/commands/storage/admin.rs(+1 -0)📝
src-tauri/src/commands/storage/commands/entities.rs(+78 -3)📝
src-tauri/src/commands/storage/sprites.rs(+28 -0)📄 Description
Linked issue
Closes #2328
Why this change
Sprite packs are written under
sprites/<characterId>andsprites/personas/<personaId>, butremove_owned_mediaonly cleaned up avatars, so the whole sprite directory leaked on entity delete.clear_runtime_media(admin reset) also skipped sprites.What changed
remove_owned_sprite_dirhelper (mirrors the avatar-cleanup pattern, reuses the validatedsprites_dirpath resolver, logs and swallows errors) and call it from thecharactersandpersonasbranches ofremove_owned_media.spritesdirectory inclear_runtime_media.Refactor impact
Primary owner: Rust storage (
src-tauri/src/commands/storage/)Impact areas reviewed:
entities.rs(remove_owned_media),sprites.rs(helper),admin.rs(clear_runtime_media). No newDeleteCleanupvariant — reuses the existingRemoveOwnedMediapath.Boundary notes:
Pressure points touched:
Validation
pnpm checkpasses before PR push/handoffManual verification notes
cargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace— green, including newdeleting_character_removes_its_sprite_directoryanddeleting_persona_removes_its_sprite_directory.Feature Discoverability
Reason:
Docs and release impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.