From 54026b11e020dc34cab0232a3eb5a6f6eccc061f Mon Sep 17 00:00:00 2001 From: feedc0de Date: Sun, 8 Nov 2026 11:48:42 +0100 Subject: [PATCH] Fix PhotoCraft snippet preload path --- image/download.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/image/download.py b/image/download.py index 20a7efb..98df58f 100755 --- a/image/download.py +++ b/image/download.py @@ -32,3 +32,12 @@ with tempfile.TemporaryDirectory() as tmp: shutil.copytree(source, destination) else: shutil.copy2(source, destination) + # The upstream web bundle preloads this module with a relative URL from + # /app/photocraft-web.js, which incorrectly resolves under /app/snippets. + for script in target.rglob("*.js"): + contents = script.read_text() + fixed = contents.replace( + 'href:"./snippets/', 'href:"/snippets/' + ) + if fixed != contents: + script.write_text(fixed)