fix(nitro): normalise uploaded bundles so meta.image matches the texture

An uploaded .nitro was written to disk byte-for-byte, so a bundle from a
third-party tool that ships a WebP member while still pointing
spritesheet.meta.image at a .png was accepted and stored as-is. The client
resolves the spritesheet through that pointer, so the result was a file
that validates fine and then renders nothing.

Re-write the bundle through createNitroBundle on import, which labels the
member from the actual bytes and repairs the pointer. No texture is
re-encoded, so the bytes stay identical, and the member keeps the base
name it arrived with so `chair*2` colour variants that share the `chair`
library are not renamed.
This commit is contained in:
openhands committed 2026-09-27 15:47:44 +02:00
1 parent 17de94d984
commit 306e209e29
4 files changed
+36 -153

No files matched your search

File diff suppressed because it is too large. Load diff