• docs/v322_new.md src/sbbs3/download.cpp

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Dec 5 22:47:29 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/91bdbb0c28991aa556a5238c
    Modified Files:
    docs/v322_new.md src/sbbs3/download.cpp
    Log Message:
    sendfile(): count each file a wildcard path matched (#250)

    sbbs_t::sendfile(char*) passes its path to the protocol driver as-is,
    and the sysop ;GET command (str_cmds.js) accepts a wildcard path
    because file_exists() matches patterns. A driver that expands the
    pattern itself (DSZ, or a command line run through a shell) sends
    every matching file, but sendfile() then measured the pattern string
    with flength(), which stat()s the literal name and returns -1. The
    user saw "mumble*.p12 (-1 bytes) sent", the node log recorded 18,446,744,073,709,551,615 bytes, the session and user download-byte
    totals were adjusted by -1, and a DSZ-log protocol was judged failed
    because no log entry matched the pattern's name.

    When the path does not exist as given and contains * or ?, expand it
    with glob() and settle each matching file on its own: check it in the
    DSZ log where the protocol writes one, count it as a download with its
    real size, show and log it by name. The transfer's elapsed time covers
    every file, so per-file lines omit the duration when more than one
    file matched; the download CPS is computed from the total. The result
    is true only when every matching file was sent. A path that matches
    nothing is handled as before.

    sexyz has not expanded wildcards since 231233096f (2026-01-08), so
    with the stock protocols a pattern still fails as "not sent".

    Fixes #250

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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