https://gitlab.synchro.net/main/sbbs/-/commit/e0288fcd8fba606945e5ee0e
Modified Files:
src/sbbs3/prntfile.cpp sbbs.h
Log Message:
Fix mods/text files shadowed by stock files w/ higher-priority extensions
A mods/text (or mods/text/menu) override file was silently shadowed by a
stock text/ file whenever the stock file used a higher-priority extension
for the caller's terminal type: e.g. with mods/text/answer.asc and stock text/answer.msg both present, a CP437 caller was shown the stock .msg file because menu()'s extension priority ladder tried .msg (in both dirs) before ever trying .asc, and the mods-dir preference was applied per-extension
inside menu_exists_in(). Worse, since the .msg/.asc order flips for ASCII-charset terminals, whether the sysop's customization was honored
depended on the caller's terminal. Behavior dates to the introduction of mods/text support in 4f66de6561 (holes-3-create). Reported by Accession
on IRC. Fixes issue #1182.
Same surgery as 151b9b5ca7 (sports-3-formal), on the mods->stock fallback
axis instead of the menu-subdir->default axis: give menu_exists_in() an explicit mods/stock tier parameter (with no cross-tier fallback) and nest
the tier loop between the subdir loop and the extension ladder in both
menu() and menu_exists(), so the search order is mods/<subdir> ->
text/<subdir> -> mods/ -> text/, each exhausted across all applicable extensions before the next is consulted.
This also fixes a latent quirk: width-variant files (e.g. .40col.ans,
.c80.ans) in the mods dir were only found when a plain same-extension mods
file also existed, since the old per-extension mods check keyed off the
plain file's existence before probing width variants.
Co-Authored-By: Claude Fable 5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net