diff options
| author | undeadhuman37 <343031842+undeadhuman37@users.noreply.github.com> | 2026-11-22 13:51:14 +0300 |
|---|---|---|
| committer | undeadhuman37 <343031842+undeadhuman37@users.noreply.github.com> | 2026-11-22 13:51:14 +0300 |
| commit | de0366d619a2bc6059c52c00e6500af89d301f31 (patch) | |
| tree | 858d192af691ce503e80049878c6b75f051a7063 /runtime/test/tiny_game_exit_code_test.cpp | |
| parent | f85582e23d4ab9e19acbf694358f137d6b8531b1 (diff) | |
save_keys: resolve refuses an --out that is one of its inputs
`resolve --out names.txt --dict names.txt` replaced the user's local
dictionary with the JSON report (exit 0, no warning); a save, a file found
in an input folder, or a hard link to either was replaced the same way.
An --out in a missing folder ended in a FileNotFoundError traceback after
the whole resolve (and --compose) had run.
resolve now checks --out before reading anything: it refuses a path that
is the same file (os.path.samefile) as any input file or --dict path, and
a missing folder, each as one error line with exit 1. A write that still
fails is reported the same way. input_files() lists the files iter_inputs
reads, so the check and the reader agree on folder inputs.
Tests: tests/test_save_keys.py 19/19 (2 new, synthetic names and saves);
the new cases fail on main (5 subtest failures). No game files, no GPU.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/tiny_game_exit_code_test.cpp')
0 files changed, 0 insertions, 0 deletions