• src/sbbs3/js_filebase.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Sunday, April 04, 2021 13:38:22
    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 Sunday, April 04, 2021 15:13:57
    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 Sunday, April 04, 2021 15:13:57
    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 Tuesday, April 06, 2021 18:37:13
    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 Tuesday, April 06, 2021 19:17:30
    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 Tuesday, April 06, 2021 19:23:56
    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 Tuesday, April 06, 2021 23:32:34
    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 Sunday, April 11, 2021 20:33:28
    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 Monday, April 12, 2021 20:49:19
    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 Tuesday, April 13, 2021 01:09:41
    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 Sunday, April 18, 2021 15:43:05
    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 Sunday, April 18, 2021 17:01:43
    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 Sunday, May 02, 2021 01:17:07
    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 Sunday, May 02, 2021 01:43:45
    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 Wednesday, May 12, 2021 23:57:52
    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 Wednesday, May 12, 2021 23:57:52
    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 Thursday, May 13, 2021 00:06:54
    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 Saturday, January 15, 2022 20:11:53
    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 Wednesday, January 19, 2022 00:09:12
    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 Tuesday, February 01, 2022 19:13:49
    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 Sunday, March 20, 2022 20:32:05
    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 Friday, September 13, 2024 20:08:11
    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 Friday, September 13, 2024 20:45:33
    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 Monday, September 16, 2024 18:52:34
    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