upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/tiny_game_exit_code_test.cpp
diff options
context:
space:
mode:
authorRafael <rafaelalvesp2005@gmail.com>2026-11-23 01:33:00 -0300
committerRafael <rafaelalvesp2005@gmail.com>2026-11-23 01:33:00 -0300
commitc8f263917100f66e600f68a494e5cfe90c5cba17 (patch)
treeab5446109cbe0e071581145348c9afb52f3b1074 /runtime/test/tiny_game_exit_code_test.cpp
parent98fa503f8a19c3ed65df1f4f2f0e4571aa42c4f7 (diff)
bvh_index: a sub-folder the report check cannot list is an error, not a silent skip (BUILD-1374)
When --out or --csv names an existing file and the target is a folder, main() walks the folder to make sure the report would not overwrite an input. That os.walk had no onerror, so a sub-folder it could not list was skipped and the check passed without having looked inside it: a report file in that folder could be overwritten. This is a safety check, so a folder it cannot list is an error: the walk's onerror calls ap.error, which names the flag and the folder and exits 2 before anything is written, like the other "would overwrite" refusals. The scan itself (scan_dir, glob on main) is left to #4431, which turns it into an os.walk whose unlistable folders are logged and make the run exit 1 as incomplete. The test forces os.scandir to raise PermissionError for one sub-folder (chmod cannot lock a folder on Windows) and checks the exit code, the folder in the message and that the existing report is untouched. 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