https://gitlab.synchro.net/main/sbbs/-/commit/151b9b5ca731ca626b28ceaf
Modified Files:
src/sbbs3/prntfile.cpp sbbs.h
Log Message:
Fix custom-shell menus showing the stock menu instead of the override-dir file
When a command shell sets a menu sub-directory override (menu_dir), menu file lookups are supposed to search that subdir before the default text/menu dir. Commit d3123dd1ae (vampire-14-reset) added that default-dir fallback, but implemented it *inside* menu_exists() on a per-extension basis. Because the terminal-type extension priority loop lives one level up in menu() (rip, mon, ans, seq, msg, asc), a higher-priority extension that exists only in the default dir would preempt a customized lower-priority extension in the override subdir: e.g. with menu_dir="errol_", a custom errol_/main.asc was shadowed by the stock text/menu/main.msg, because menu() asked menu_exists(code,"msg") (which fell back to the default dir and matched) before ever trying .asc in the subdir. Result: the stock "classic" menu was displayed while the custom shell's keystroke handling still worked -- as reported by Errol Casey (Amessyroom) on sync_sysops.
Move the subdir->default fallback out to wrap the *entire* extension search, in both menu() and the NULL-ext path of menu_exists(), so the override subdir is exhausted across all extensions before the default dir is consulted at all. Factor the single-dir, single-extension lookup into a new no-fallback helper menu_exists_in(). Direct callers of menu_exists() (including the JS bbs.menu_exists() binding, str.cpp info-file checks, and random_menu()) keep the two-pass fallback and their existing boolean contract.
Co-Authored-By: Claude Opus 4.8 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net