diff options
| author | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-23 01:32:58 -0300 |
|---|---|---|
| committer | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-23 01:32:58 -0300 |
| commit | f78f7d6a2a9364cb128c03ac539fe540d5c70df1 (patch) | |
| tree | dff5c16461100dbb79986241d238522247a0b586 /runtime/src/xma2_decoder.cpp | |
| parent | 98fa503f8a19c3ed65df1f4f2f0e4571aa42c4f7 (diff) | |
bink_names: a sub-folder the --out check cannot list is an error, not a silent skip (BUILD-1374)
When --out names an existing file, main() walks every source and mount
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 folder and exits 2
before anything is written, like the other "--out would overwrite ..."
refusals. The discovery walk in mount_documents() is left to #4176,
which already makes it fail on an unlistable folder.
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/src/xma2_decoder.cpp')
0 files changed, 0 insertions, 0 deletions