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>