https://gitlab.synchro.net/main/sbbs/-/commit/5185eec5a6d9d53581014588
Modified Files:
src/sbbs3/js_filebase.cpp
Log Message:
FileBase.update(): don't destroy stored text the caller didn't supply
A file object with no 'extdesc' or 'auxdata' property meant "write NULL
over whatever is stored", because those two live in the message data
blocks and the changed-text path removes and re-adds the record. Every
other property already means "leave it alone" when absent, since parse_file_properties() only writes a header field when the property
exists on the object.
So a script that reads a record and hands the object back silently
dropped both: rehashfiles.js, updatefiles.js, readdfiles.js and
testbuild.js all fetch below the detail level of the text they then
overwrite, and fileman.js drops auxdata whenever a sysop edits an
extended description.
Load the record at file_detail_auxdata, as renew() already does, so the
stored values are there to keep, and fall back to them when the caller
supplied none. An empty string still clears, so either one can still
be removed deliberately.
Extract the DIZ only when use_diz_always was requested or the file has
no extended description to keep. It used to replace a hand-edited
description with the archive's FILE_ID.DIZ whenever the caller simply
did not mention the extended description.
Compare the loaded auxdata with trailing whitespace trimmed, as the
extended description already was, so handing back identical auxdata no
longer reads as a change and no longer forces a remove and re-add.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net