Skip to content

fix: keep custom model state consistent with disk#989

Open
ShiroKSH wants to merge 1 commit into
ayangweb:masterfrom
ShiroKSH:fix/custom-model-state-consistency
Open

fix: keep custom model state consistent with disk#989
ShiroKSH wants to merge 1 commit into
ayangweb:masterfrom
ShiroKSH:fix/custom-model-state-consistency

Conversation

@ShiroKSH

Copy link
Copy Markdown

Summary

  • reject custom model folders without a root Live2D model descriptor before copying or persisting them
  • remove stale model records when their backing directory is already missing
  • keep the saved model list and current selection intact when filesystem deletion fails

Root cause

The importer treated a successful directory copy as a valid model import, while the loader requires a root *.model3.json file. The delete path updated Pinia state from finally, so it discarded the model record after both successful and failed filesystem operations.

Checks

  • eslint src
  • tsc --noEmit
  • vite build

@ShiroKSH

Copy link
Copy Markdown
Author

@ayangweb We'd appreciate it if you could take a look at this pull request when you have a chance.

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.

1 participant