Skip to content

Fix exporter loading of old GGPK data#1886

Open
unrealdreamz wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/exporter-old-ggpk-data
Open

Fix exporter loading of old GGPK data#1886
unrealdreamz wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/exporter-old-ggpk-data

Conversation

@unrealdreamz
Copy link
Copy Markdown
Contributor

Fixes #1556

Summary

  • Let cached DAT loading find both current Data/Balance/... files and older pre-0.4.0 Data/... files.
  • Save the currently selected DAT spec before switching sources, rather than writing the current spec into the newly selected source before loading it.
  • Reuse one SaveDatSpec helper for source switching and shutdown.

Root Cause

Two exporter paths were brittle for older GGPK data:

  1. AddDat64Files only looked for cached files under the newer Data/Balance layout, so older extracted data under Data was reported missing.
  2. LoadDatSource assigned self.datSource = value before saving, then wrote the previously loaded self.datSpecs to the newly selected source's spec path. That could overwrite the spec the user was trying to load.

Fix

DAT lookup now tries the exact requested path first, then the legacy Data/ path for Data/Balance/ entries. Source switching now saves the previous source's spec before assigning and loading the new source.

Validation

  • git diff --check — pass, exit code 0.
  • No exporter UI/GGPK extraction run locally in this pass because this machine was explicitly kept free of local app/test windows.

Risk/Rollback

Low exporter-only risk. Current cached data remains preferred because the new path is tried first; the legacy path is only a fallback. Rollback is isolated to exporter source/spec loading and cached DAT lookup.

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.

Fix issues loading old GGPK data in the exporter

1 participant