https://gitlab.synchro.net/main/sbbs/-/commit/8754b91000f3f1421b87282e
Modified Files:
exec/inventory_archives.js exec/load/filecontents_lib.js exec/webfileindex.ssjs
Log Message:
inventory_archives: rewrite as the content-store populator
It wrote listings into each file's auxdata via FileBase.update() with readd_always set, which zeroes when_imported (js_filebase.cpp) so that smb_addmsg() re-stamps it to the current time (smbadd.c:247). A run across every area would have marked the whole file base as newly imported. It also skipped any file that already had data rather than checking whether that data was still valid, so it could not refresh anything.
Targeting the content store removes the file-record write entirely, so both problems go with the mechanism. Extraction runs unlocked and only the merge takes the area lock, in batches, so a long run does not hold viewers off an area. Area codes are now optional, defaulting to every area, and -force, -dry, -delay, -max and -quiet were added.
Also fixes a shadowing bug that corrupted every record the web server wrote. webfileindex.ssjs defined its own file_size() and file_date(), which take a file object and return HTML, shadowing the globals of the same name for any library loaded into it. Sizes were stored as the string "0" and dates as "",
so such a record could never match a real file and so never expired. The library now reads metadata through the File object rather than ambient
globals, and the two functions are renamed. Records already written this way repair themselves on next view, a string size never equalling a real one.
#1247
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net