From d3c512b14f7c7ca19f9fc49bad0a007b15190fad Mon Sep 17 00:00:00 2001 From: Daniel Maksymilian Syrnicki Date: Thu, 16 Apr 2026 15:58:10 +0200 Subject: [PATCH] fix(furtka): point DEFAULT_BUNDLED_APPS_DIR at /opt/furtka/current/apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Third install-path miss from the versioned-layout refactor: the bundled apps moved from /opt/furtka/apps (flat) to /opt/furtka/versions//apps/, reached through the /opt/furtka/current symlink. paths.py was still pointing at the flat path, so _list_bundled walked a non-existent directory and /api/bundled returned [] — the fileshare tile never showed up on /apps. Tests already use FURTKA_BUNDLED_APPS_DIR env override so nothing in the suite needed to change. Confirmed on the VM: compat symlink /opt/furtka/apps -> current/apps makes /api/bundled return the fileshare manifest immediately, no service restart needed since scanner.py reads the directory on every request. Locking the path at current/apps rather than leaving the flat fallback is deliberate — Phase-2 self-updates flip the symlink, and a flat /opt/furtka/apps wouldn't move with them; bundled apps would freeze at whatever version installed first. Co-Authored-By: Claude Opus 4.6 (1M context) --- furtka/paths.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/furtka/paths.py b/furtka/paths.py index f32d895..9b6166d 100644 --- a/furtka/paths.py +++ b/furtka/paths.py @@ -2,7 +2,11 @@ import os from pathlib import Path DEFAULT_APPS_DIR = Path("/var/lib/furtka/apps") -DEFAULT_BUNDLED_APPS_DIR = Path("/opt/furtka/apps") +# Bundled apps live alongside the Python package inside each versioned slot +# (/opt/furtka/versions//apps/), reached via the /opt/furtka/current +# symlink. A flat /opt/furtka/apps path would break the Phase-2 self-update +# flow (symlink swap wouldn't move the bundled-app tree along with the code). +DEFAULT_BUNDLED_APPS_DIR = Path("/opt/furtka/current/apps") def apps_dir() -> Path: