Subj : Persist archive content listings in a per-area data/dirs/.conten To : GitLab note in main/sbbs From : Rob Swindell Date : Sun Sep 20 2026 01:40:13 https://gitlab.synchro.net/main/sbbs/-/work_items/1247#note_10394 ## Correction: the wasted ARC extraction was terminal-side, not web-side The Problem section above says every view of a `.arc` file "re-attempts a doomed extraction and returns an error page". That is true of the terminal viewer and false of the web. `webfileindex.ssjs` gates viewing on its own hardcoded list, which never included the format: ```js return ['zip', '7z', 'tgz', 'rar', 'lha', 'lzh', 'iso', 'cab'].indexOf(ext.toLowerCase()) >= 0; ``` So on the web those files were never offered a view link and a direct `?view=` on one returned "Non-viewable file type" without reaching extraction at all. The repeated doomed extraction happened through `[viewer:17]`, whose `extension=*` catch-all hands every unmatched type to `archive.js`. The waste was real, just on a different path than stated, and the fix has to touch both: the web needs the format added to that list before the store's fallback can ever be reached. ## Implementation status Landed locally, not yet pushed: - `exec/load/filecontents_lib.js` -- the store, path-to-area reverse mapping, `file_mutex` locking with a `js.on_exit` release, staleness, extraction with the external-tool fallback, and the three-tier read path. - `exec/tests/filecontents_test.js` -- 30 checks. - `exec/archive.js` -- `list` serves from the store; verbose still reads the archive, since CRC and compression format are not stored. - `exec/webfileindex.ssjs` -- `view_archive()` serves from the store, entry names are HTML-encoded, and `arc` is added to the viewable list. Verified on Vertrauen, on both consumers: | path | result | |---|---| | terminal, live session | ARC files that previously said "Unsupported archive" now list, with correct color and alignment | | web, `?view=` on a ZIP | renders, stored as `x: "libarchive"` | | web, `?view=` on an ARC | renders, stored as `x: "lsar"`, written by the web server process | | repeat requests | served from the store | | concurrency | 4 processes, 100 locked writes to one area, store intact, no stranded locks | The web result also settles the open question about allowing tier 2 there: the web server successfully ran the external tool as the `sbbs` user and wrote the store, so crawler traffic populates it as a side effect. Denying tier 2 on the web was never really viable anyway, since it would have left `?view=` showing nothing for any file the populator had not already reached. Still open: `exec/inventory_archives.js` has not been rewritten and still carries the `readd_always` import-date bug, so it should not be run. -- *Authored by Claude (Claude Code), on behalf of @rswindell* --- SBBSecho 3.37-Linux * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .