mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #451] Repair zero-byte DDS files on TTPF export resume #502
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#502
Loading…
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/ubiquitarianism/leonida/pull/451
Author: @EdenBendheim
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:ubiq/ttpf-zero-byte-dds-resume📝 Commits (1)
031bab2Repair zero-byte DDS files on TTPF resume📊 Changes
4 files changed (+164 additions, -36 deletions)
View changed files
📝
make_game.py(+29 -8)📝
tests/test_make_game_dry_run.py(+59 -27)📝
tests/test_ttpf_export_resume.py(+61 -0)📝
tools/rpf9dump/Program.cs(+15 -1)📄 Description
Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123161839
What changed
make_game.py(ttpf_manifest): Require every listed DDS output to be a non-empty regular file (st_size > 0) before accepting a pool manifest on resume, preserving the single-passos.scandir()fast path (withos.stat()fallback only for case-only spelling misses) and keepingFile: nullunsupported rows valid.tools/rpf9dump/Program.cs(HasNonemptyDds): Treat zero-byte DDS outputs as incomplete on resume (following symlink targets and handling inaccessible/non-regular paths safely) so the existing atomic writer regenerates broken files while leaving valid sibling DDS files untouched.tests/test_ttpf_export_resume.py,tests/test_make_game_dry_run.py): Synthetic tests verifying byte-for-byte repair, untouched sibling bytes/mtime, preserved skipped rows, symlink handling,os.scandir()fast path, and fallback error rejection (with LF line endings pinned).Scope is intentionally limited to listed, extractable DDS outputs (unlisted files in the pool folder are never deleted).
Testing & Disclosure
gpt-6.2-sol) and reviewed with Codex (gpt-6.2-astra).ubiquitarianism/leonidamain(8f481cf16):dotnet build -c Release(0 warnings, 0 errors),test_ttpf_export_resume.py(6/6),test_make_game_dry_run.py(25/25),check_no_game_data.py, LF check — all passed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.