diff options
| author | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-23 01:33:00 -0300 |
|---|---|---|
| committer | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-23 01:33:00 -0300 |
| commit | c8f263917100f66e600f68a494e5cfe90c5cba17 (patch) | |
| tree | ab5446109cbe0e071581145348c9afb52f3b1074 /runtime/test/queue_proxy_test.cpp | |
| parent | 98fa503f8a19c3ed65df1f4f2f0e4571aa42c4f7 (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/queue_proxy_test.cpp')
0 files changed, 0 insertions, 0 deletions