• src/sbbs3/js_filebase.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Dec 24 17:33:28 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/41ace72c24800de0fa0b3b23
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Fix filebase corruption caused by FileBase.renew()

    echicken reported this problem: pretty severe filebase corruption as a result of calling FileBase.renew(). The problem seemed pretty obvious (only loading the file's index record), but I do think the underlying SMBLIB functions
    should be more resilient to misuse and not corrupt the base. So, that's still
    a TODO.

    No existing scripts were using FileBase.renew(), so this problem has gone unnoticed since SBBS v3.19.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Dec 25 20:29:47 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/22d7343f21cbd9cee29a4118
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Rename the METADATA and metadata properties to AUXDATA and auxdata

    To eliminate confusion with the file-meta-object that this API deals with
    more than anything else.

    echicken's suggestion

    Nothing used this property before now, so this should be fine.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Dec 28 18:10:58 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/ad309d463528da40cfd32354
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Fix misuse of JSVAL_TO_DOUBLE() for "cost" and "size" file-meta-obj properties

    As pointed out by echicken: when setting the "cost" property to any value, the actual
    file's cost would be set to 9223372036854776000 regardless of what number was in the
    provided file metadata object. Most jsval numbers aren't doubles (they're ints) so
    need to use JS_ValueToNumber() to do the proper conversion, regardless of underlying
    type.

    Noticed the same problem with the "size" property.

    Thanks for the tests and report echicken!

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Fri Dec 29 17:10:27 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/0dbd3f064a2dee66cca6c409
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Fix some apparent memory leaks when using file's auxdata

    Nobody's really using this auxdata yet, besides echicken, so no impact for others.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Fri Dec 29 17:10:27 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/831ddd710d935eee37639446
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    When FileBase.update() is called with readd_always=true, update date-added

    The use from addfiles.js (the -readd option) implies this is what's expected. And echicken was suprised the 'added' date/time-stamp wasn't udpated.

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