• src/sbbs3/js_filebase.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 4 13:38:22 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/659f6e0d87fea403aae9236d
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Fix memory leaks caught by Coverity.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 4 15:13:57 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/bc4f24f5626f1c7bdf528680
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Alt paths aren't supported/used any longer

    Fixes CID 330973

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 4 15:13:57 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/aee8542a6afaf51083b869d2
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    dirnum is unsigned, so do not check for negative

    CID 330990

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Apr 6 18:37:13 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e719d289fb2b2f836fb6b321
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Include all properties in getter when detail is MAX

    Adds from/tags/desc/extdesc properties, even when absent or blank.

    When parsing a file object, set the from, desc, tags and cost properties only if they already have been set or the new values is non-blank/0.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Apr 6 19:17:30 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/bf1644a88808595973c4a494
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Fix missing paren warnings.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Apr 6 19:23:56 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/0d215884b2c89383ff6c59b4
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Don't expand empty from, tags, desc properties unless detail=MAX

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Apr 6 23:32:34 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e7efe6d343ca10a959dfae4e
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Fix hash() method broken in commit bc4f24f5 - file needs the dir num

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 11 20:33:28 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/8b59ee66aa45470694ded86b
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Add format_name() method to format a filename for display

    It's a wrapper for filedat.c -> format_filename() which can truncate and pad a filename for display purposes.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Mon Apr 12 20:49:19 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/cc06b0b54b403549e83a268d
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Fix some memory leaks

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Apr 13 01:09:41 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/c487956b0d81725b50057cb2
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Check return value of JS_ValueToInt32()

    CID 331092

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 18 15:43:05 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/2eb90776e1b0c1845d21c516
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    remove() method needs to read message header (not just index)

    Or else it fails with the following base error:
    !smb_putmsghdr illegal header length increase: 70 (1 blocks, 0 hfields, 0 dfields) vs 0 (0 blocks)

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 18 17:01:43 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e5ccdb106973f01eb85dd564
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    get_size() and get_path() methods need to read the header record too

    For files with names > 64 chars.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun May 2 01:17:07 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/63a2631feccde997f9ddb0fc
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    JSDOC updates

    Finally document the file-meta-object properties now that things are solidifying.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun May 2 01:43:45 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/24bf49ea8843706ebbc7dfc9
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Add a 'readd_always' option to the update() method

    This will cause archive file contents to be re-captured/added

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wed May 12 23:57:52 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/b3d55fd249366cd28d4bfc99
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    The optional JSON-metadata string property is now "metadata"

    The old "content" array property goes away.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wed May 12 23:57:52 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/1c96d408344fc24113b40be7
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Allow the metadata property to be set with add() and update()

    Sorry for the impending imminent merge hassle Deuce!

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu May 13 00:06:54 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/2b047cf6edd3d3108107a5ac
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Don't populate metadata property unless there is metadata

    Or detail level is MAX.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • 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 Debian Linux)@VERT to Git commit to main/sbbs/master on Fri Sep 13 20:08:11 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/2fc23c32c4b0b19685f2cb0e
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    FileBase.update() method throws more exceptions upon error

    This will help to determine cause of any file update (e.g. rename)
    failures, as reported by Nelgin.

    ---
    ■ 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 Fri Sep 13 20:45:33 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/397d6ebe5b0185bdff5c0c59
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Don't allow FileBase.update() to create a duplicate file

    FileBase.update() will now throw an exception if attempting to rename a file
    to a filename that already exists in the filebase index.

    Prior to this change, one could (via JS methods) rename a file in the base to create a duplicate filename which would corrupt the base (one index entry and two header records for the same filename).

    ---
    ■ 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 Sep 16 18:52:34 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/2391c3c9a3912622b8016333
    Modified Files:
    src/sbbs3/js_filebase.c
    Log Message:
    Update JSDOC description of update() method

    Clarify that this is the method to use to rename a file.

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