• src/sbbs3/js_filebase.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jan 15 20:11:53 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/3e5326e0e81d2497468e238c
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Correct JSDOCS for get_path, get_size, and get_time methods

    These methods also (optionally) accept a file-meta-object as an argument.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wed Jan 19 00:09:12 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/2d033355aab58a6a6c78db5d
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Fix typo (wrong default size value) in JSDOCS for format_name()

    The default is 'size' parameter value is 12 characters, not 13.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Feb 1 19:13:49 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/70898b5bbf5f1b993a0f1cfc
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    add() method will now parse added, last_downloaded, and times_downloaded

    These 3 'stats' properties were read-only (never used when adding a file). To support moving files between FileBases while retaining these stats, support the parse/use of these file-meta-object property values.

    Should fix issue #333 reported by Nightfox.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Mar 20 20:32:05 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/623c49e43906d3f86fb3c247
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    File's meta-object's "size" and "time" properties reflect current values

    Query the disk for file's current "size" and "time" values when get_list() or get() method is used with a "detail" level of >= DETAIL.NORMAL and the "check file existence" toggle option is enabled for this directory in SCFG.

    I pondered and contemplated whether this configuration setting should be checked/applied here or in the various JS scripts (e.g. filelist.js) and decided here was best to provide the most uniform/expected behavior, even though there is a performance impact. If a script doesn't need/use these properties, they should probably be specifying the DETAIL.MIN (minimal) detail level in their queries anyway, which will then bypass these performance-impacting disk queries.

    ---
    þ 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 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