• exec/tests/listfiles_brid

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Thu Nov 19 15:05:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/a845eca50489736390ac23a1
    Modified Files:
    exec/tests/listfiles_bridges/bridges.js skipif src/sbbs3/js_bbs.cpp js_filebase.cpp
    Log Message:
    JS file objects: fail on an exception; move_file() checks destination

    parse_file_properties() returned JS_FALSE when converting a property raised
    a JavaScript exception, and JS_FALSE equals SMB_SUCCESS, so its callers
    carried on: FileBase.add() stored the file (and update() saved the changes) with the exception left pending, as did bbs.expand_atcodes() with a file object. It now returns SMB_FAILURE, so those calls throw and store nothing.

    bbs.move_file() now also requires that the user can access the destination directory, as the built-in file lister's directory selection does.

    The listfiles bridge test now uses a throwaway directory with the internal
    code TEST_RM and covers the exception cases.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Thu Nov 19 18:52:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/c29e1bdfc55af507f7b2abd5
    Modified Files:
    exec/tests/listfiles_bridges/bridges.js src/sbbs3/js_bbs.cpp sbbs.h viewfile.cpp
    Log Message:
    JS bbs.can_view_file(): whether the user may view a file's contents

    True when the file exists and a file viewer configured for it is available
    to the user, the same rule the View command applies (the viewer's access requirements checked with the file's directory current); it displays
    nothing. File lister modules use it to decide whether to show a file's
    contents themselves. The viewer selection is shared with viewfile().

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Thu Nov 19 18:52:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/5527b5a4b91f7cfcac26a0f0
    Modified Files:
    exec/tests/listfiles_bridges/bridges.js src/sbbs3/js_bbs.cpp
    Log Message:
    JS bbs.batch_dnload_list(): the files in the batch download queue

    Returns an array of objects with the filename ("name") and the directory's internal code ("dir") of each file in the current user's batch download
    queue, so modules can tell which files are queued without reading the
    queue file themselves.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>