• src/sbbs3/upgrade_to_v319.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat Nov 8 19:48:59 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/6f71897b0a5e37dea4a1feca
    Modified Files:
    src/sbbs3/str_util.c str_util.h upgrade_to_v319.c
    Log Message:
    Eliminate "hex-plus" number concept from sbbs v3.2x, unused since v3.18

    Move hptoi() to upgrade_to_v319.c, since it's still needed to parse the
    old filebases.
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed May 27 22:35:57 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/46e06da739b2b3cb36eb403a
    Modified Files:
    src/sbbs3/upgrade_to_v319.c
    Log Message:
    upgrade_to_v319: refuse to clobber already-upgraded file bases

    After smb_open(), check smb.status.total_msgs and skip any dir with
    existing files; require -f on the command line to force overwrite.
    Previously the tool unconditionally re-ran smb_create() on every dir, destroying populated SMB file bases when re-run on an upgraded system.

    Also remove the unused overwrite() helper and add -h/-? usage.

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Aug 9 07:19:11 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4cf8e2f01b9eb7f374393b9e
    Modified Files:
    src/sbbs3/upgrade_to_v319.c
    Log Message:
    upgrade_to_v319: read the legacy index before smb_create() destroys the base

    smb_create() truncates .shd to the base header, and .sdt and .sid to zero.
    It was called before the directory's legacy .ixb was opened, so a directory with no legacy data to convert had its file base emptied and was only then skipped -- the check that should have made it a no-op ran after the
    destruction it was meant to prevent.

    Under -f that turned "reset this base to its pre-3.19 contents" into "erase it", which also means removing the now-vestigial .ixb/.dat/.exb/.dab files
    made an accidental run strictly more destructive rather than safer.

    Read and validate the .ixb first and skip the directory before touching anything; only then open the extended-description file and create the base.
    The early-exit paths no longer need closeextdesc() because the file is not
    open yet, and the smb_create() failure path now releases the index buffer
    and the extended-description file, which it does have open by that point.

    A directory with no legacy data is now left untouched rather than
    initialized as an empty v3.19 base. That is harmless: smb_open_dir()
    already creates any file base whose .shd is empty, so such a directory is initialized on first use.

    Complements 46e06da739 (desk-5-these, 2026-05-27), which stopped a run
    without -f from clobbering an already-upgraded base.

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

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