• src/smblib/smbfile.c src/smblib/tests/smbfilenametest.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Sep 30 02:44:22 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/fb0e091f6fd695b2be65cc52
    Modified Files:
    src/smblib/smbfile.c src/smblib/tests/smbfilenametest.c
    Log Message:
    smb_removefile(): find the file's index record before changing anything

    The file's header was marked deleted and its data freed before its index
    record was looked up. A file passed in without its index record loaded (idx.number of 0, e.g. from smb_getmsghdr() alone) matched nothing, so the function failed with a "name not found" error only after leaving the
    index pointing at a deleted header.

    The index is now read and searched first; when the record is not there, SMB_ERR_NOT_FOUND is returned with the base untouched and an error that
    names the index record number.

    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

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