Skip to content

fix(mods): preserve unreadable skin metadata and roll back failed imports - #378

Merged
Alban1911 merged 1 commit into
Alban1911:mainfrom
Lng999:fix/skin-manifest-integrity-20261020
Oct 20, 2026
Merged

Alban1911 merged 1 commit into
Alban1911:mainfrom
Lng999:fix/skin-manifest-integrity-20261020

Conversation

@Lng999

@Lng999 Lng999 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

A transient read failure on a valid skin-mod manifest previously looked like an empty manifest, so the next import/target update replaced existing targets and display aliases. If metadata saving failed after extraction, the imported folder was also left behind despite the reported failure.

Require readable existing target metadata before writing, including the legacy manifest fallback. Roll back only the newly promoted skin import folder when registration fails; preserve existing mods and metadata. Missing manifests and valid legacy imports continue to work.

Validation: four regression cases fail against 146f7986; all nine manifest tests pass with this change. Coverage includes valid JSON with a transient PermissionError, import rollback, unreadable legacy metadata, missing manifests and valid legacy imports. python -B -m unittest discover -s injection/tests -t .: 61 tests pass with temporary LOCALAPPDATA. Ruff E9/F63/F7/F82 and git diff --check pass. New tests use temporary files and mocks.

@Alban1911
Alban1911 merged commit 027d6e5 into Alban1911:main Oct 20, 2026
3 of 4 checks passed
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.

2 participants