Commit Graph

13 Commits

Author SHA1 Message Date
beb75ec566 rpf9_names: make the staging file deletable when a replace fails
The staged report carries the destination's bits, so on Windows a failed
os.replace over a read-only report leaves a read-only stage the
TemporaryDirectory cleanup refuses to delete, masking the real error with a
cleanup failure. The cleanup now makes the staged file writable before
deleting and lets one delete failure go, so the caller reports the replace;
a successful publish is unchanged and the prior report stays intact on
failure. Same shape as navmesh_index's, bvh_index's and story_index's
staging cleanup.

Regression test in the style of those failed-replace tests: it fails against
the old code on the made-deletable assertion. Synthetic archives only; no
game data.

Claimed in the coordination issue as RPF9-NAMES-STAGE-CLEANUP (issue #14).
AI-assisted.
2026-11-25 20:38:26 +01:00
e36d4c4561 rpf9_names: print the --out path without repr() in both error lines (EGEN-RPF9NAMES-PATHREPR) (#6737)
Squash-merged after diff review of PR #6737
2026-11-23 10:49:29 -06:00
85e368def5 Reduce short-stream read-ahead in the RPF9 name indexer 2026-11-22 23:35:48 +05:30
bfced741ce Merge pull request #1586 from bbareth 2026-11-22 08:08:08 -05:00
fc4b1db349 rpf9_names test: detect unbounded calls in the negative control
AI-assisted with DeepSeek V4 Pro. Verified that the capped implementation passes and the base fails the positive max_length assertion on macOS arm64.
2026-11-22 13:59:13 +01:00
eaa441d0ef Merge pull request #1586 from bbareth 2026-11-22 07:38:24 -05:00
23bc91f51c rpf9_names.py: bound transient output while inflating a stream 2026-11-22 13:26:46 +01:00
fc80bbf199 rpf9_names.py: protect the input and stage reports privately 2026-11-22 12:55:36 +01:00
95b94a215c Merge pull request #1049 from JavierBlanco23 2026-11-22 01:38:03 -05:00
f7ce2ff587 rpf9_names.py: bound --limit inflation to scan window and honour --quiet 2026-11-22 07:15:18 +01:00
09cfe2e854 rpf9_names: skip Bink 2 videos whole and keep inflation inside the --limit window
scan_archive() stepped three bytes past a KB2 signature and went on looking
for zlib headers inside the video body, so a stream embedded in a video was
reported with its names and the video's bytes were counted as zero padding or
unread. It now applies rpf9_carve.py's header test (length at +4, width and
height at +0x14) and skips a plausible video whole, counted in the new
bink2_files and bink2_bytes summary keys.

The inflate loop was bounded by the file size, not by the scan window, so a
stream crossing the end of a --limit window was still reported with a stored
size larger than the span. It is bounded by the window now, as in
rpf9_carve.py.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 13:04:28 +07:00
092b028bcd Tools: close archive mmaps on error and reject empty rpf9_names inputs 2026-11-21 22:12:32 -03:00
5b8dd6854b Tools: index named RPF9 resources without the TOC 2026-11-21 23:11:56 +00:00