mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-07-29 11:44:38 +02:00
Kiwix runs in library mode reading kiwix-library.xml via --monitorLibrary. Today a missing or corrupt XML is only repaired on the download path (rebuildFromDisk after a completed download), so if the file is lost or truncated outside that flow — storage relocation, an interrupted write, manual deletion — Kiwix comes up serving an empty library with no path to recovery. Add KiwixLibraryService.ensureLibraryXmlHealthy(): reads the XML, and if it's missing (ENOENT) or fails to parse / lacks a <library> root, rebuilds it from the ZIM files on disk. A well-formed but empty library is treated as valid (no spurious rebuild), and filesystem errors other than ENOENT are surfaced rather than masked. The boot provider calls it on the already-in-library-mode path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| bin | ||
| commands | ||
| config | ||
| constants | ||
| database | ||
| docs | ||
| inertia | ||
| providers | ||
| public | ||
| resources | ||
| scripts | ||
| start | ||
| tests | ||
| types | ||
| util | ||
| views | ||
| .editorconfig | ||
| .env.example | ||
| ace.js | ||
| adonisrc.ts | ||
| eslint.config.js | ||
| package-lock.json | ||
| package.json | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| vite.config.ts | ||