• src/sbbs3/exec.cpp jsexec.cpp

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Aug 1 19:37:26 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8f8a8f9249cb8baf6fad6cd3
    Modified Files:
    src/sbbs3/exec.cpp jsexec.cpp
    Log Message:
    Append the implicit .js extension to path-form module names too

    A JavaScript module command-line with no filename extension gets ".js"
    appended - but only when the name contains no path separator. sbbs_t::js_execfile() appends it on the branch that searches the startup,
    mods and exec directories; a name with a separator is copied verbatim and
    then fails its own existence check. So a "?"-prefixed external editor or program command like "?../xtrn/hermedit/hermedit" cannot find
    hermedit.js, even though exec_bin() located it a moment earlier.

    Append the extension on the verbatim branch as well, after the name as
    given fails to resolve, so a script that genuinely carries no extension
    still loads.

    jsexec had the same gap for a different reason: js_ext() tested
    strchr(fname, '.'), which matches the dot in a relative name such as "../xtrn/probe/probe" and concludes the name already has an extension.
    Test with getfext() instead, which looks only at the filename component.
    One behavior change falls out of that: an extensionless script named by
    path no longer loads verbatim, and is now treated the way a bare
    "jsexec noext" has always been treated - as a request for noext.js.

    Both gaps surfaced on merge request !717.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net