Repository navigation
bink_names: reserve index.json before a directory becomes a carve - #6777
Conversation
Keep an ordinary input directory from being mistaken for a carve on the next lookup.
|
Tested 7f53ace on Linux (Ubuntu 24.04.5 LTS, x86_64, Python 3.12.16, CPU-only, no game files): pass. Commands run:
Code review notes:
(AI-assisted review) |
shayderrr
left a comment
There was a problem hiding this comment.
Summary
tools/bink_names.py:main() now reserves index.json in any source or mount directory as the carve manifest, even when that file does not yet exist: the same_output_path() guard moved outside os.path.isfile(manifest), and --out help spells out the reservation. tests/test_bink_names.py adds a loop over both folders asserting exit 2, a "carve manifest" stderr message, and no file created.
Why merge
Closes a hole where a fresh report could be written over a future carve manifest. The test covers both source and mount paths and checks the guard before any file exists.
Verdict: Approve
Summary
Why mergeCloses a hole where a fresh report could be written over a future carve manifest. The test covers both source and mount paths and checks the guard before any file exists. Verdict: Approve |
Claimed in the coordination issue as: four media-tool items on #6603,
bink_namesitem.What and why
When a source or mount directory had no
index.json,--outcould create a names report there. The second invocation then treated that path as the carve manifest and refused to rerun; for mount directories, other lookups would switch from XML discovery to the carve reader. Reserve the root manifest path on the first run asbink_indexalready does, without rejecting a regularnames.json.Tested
python3.12 -I tests/test_bink_names.py: 33 passed.mount/index.jsonwith status 2 without creating it; writing tonames.jsonresolved the expected movie. The regression covers both directory inputs.git diff --checkandpython3.12 -I scripts/check_no_game_data.pyon the changed paths passed. Merge-tree trials: Clean against main and bink_names: a sub-folder the --out check cannot list is an error, not a silent skip (BUILD-1374) #4728, tests: missing-input checks in awc_names and bink_names use a fresh temp dir (TEST-1177) #5245, tools: print the plain path, not a repr'd one, in OSError messages #5760, bink_names: read a streams JSON index saved with a UTF-8 BOM #5877, tools: print a refused or unreadable path as typed, not through repr() (5 tests fail on Windows) #5927 and tools: print Windows paths in error messages without repr() doubling #6049.AI-assisted: yes.
Checklist