From f28a75922e550eae835ad55dfdba1ed6c31d9ede Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 23 Sep 2026 16:01:47 +0200 Subject: [PATCH] fix(memory): serve media archived while the wiki is running A screenshot filed from a capture room showed on its wiki page as a broken image, and its File link answered 404, until the wiki container was next recreated. The media archive writes through a temporary `.tmp-*` file beside the target and renames it into place; ffmpeg derivatives are written the same way and take long enough for the wiki's file watcher to report them. Quartz then asks its Assets emitter to copy or unlink a path that is already gone, and the emitter throws. Quartz 4.5.2 keeps every change since startup and replays them on each rebuild, so the failure repeats: the process exits, or later assets never reach the site. Exclude `media/**/.tmp-*` from Quartz's content, which also removes the files from what the watcher reports. Fixes: 03e1708 ("feat(memory): keep the original file behind a wiki page (#92)") --- stacklets/memory/quartz/quartz.config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stacklets/memory/quartz/quartz.config.ts b/stacklets/memory/quartz/quartz.config.ts index 2a457272..7d05f776 100644 --- a/stacklets/memory/quartz/quartz.config.ts +++ b/stacklets/memory/quartz/quartz.config.ts @@ -48,8 +48,13 @@ const config: QuartzConfig = { // published site. Each one names the room, the sender's full mxid and // the original filename: useful beside the file on disk, not something // to serve. The media itself is copied by the Assets emitter as usual. + // `media/**/.tmp-*` hides the archive's in-progress writes, which are + // renamed into place when complete. The watcher otherwise reports + // them, the Assets emitter copies or unlinks a path that is already + // gone, and Quartz 4.5.2 keeps the failed change and replays it on + // every rebuild, so no later asset reaches the site. ignorePatterns: [".git", ".obsidian", "private", "templates", - "media/**/*.json"], + "media/**/*.json", "media/**/.tmp-*"], defaultDateType: "modified", theme: { // Self-hosted. The comment above about analytics applies with more