From 43c07e91e476e6a988c51f538a2f803e7219364e Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Mon, 28 Sep 2026 07:31:40 +0200 Subject: [PATCH] fix(fireflyiii_fints_importer): stop the configurations folder nesting inside itself /data persists across restarts, so from the second boot on `ln -sf $CONFIGSOURCE /data/configurations` dereferenced the existing link and created $CONFIGSOURCE/fireflyiii_fints_importer -> itself. The app then listed that entry as a configuration and file_get_contents() failed on it (#3091). Use ln -sfn, remove the leftover self-link, and drop the dead copy blocks (they tested -f on directories) and the /app/configurations link, which made the app list every configuration twice. Fixes #3091 Co-Authored-By: Claude Opus 5.5 --- fireflyiii_fints_importer/CHANGELOG.md | 4 ++++ fireflyiii_fints_importer/config.yaml | 2 +- .../rootfs/etc/cont-init.d/20-folders.sh | 17 +++++------------ 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/fireflyiii_fints_importer/CHANGELOG.md b/fireflyiii_fints_importer/CHANGELOG.md index 1f2597a594..43ae378f98 100644 --- a/fireflyiii_fints_importer/CHANGELOG.md +++ b/fireflyiii_fints_importer/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.3.0.8 (28-09-2026) + +- Fix the configurations folder nesting inside itself on every restart, which made the web UI show `ConfigurationFactory.php` errors (#3091). The leftover self-referencing link is removed at startup, and the configurations are now linked only once, at `data/configurations`. + ## 1.3.0.7 (23-09-2026) - Rebuilt against the current upstream `benkl/firefly-iii-fints-importer` diff --git a/fireflyiii_fints_importer/config.yaml b/fireflyiii_fints_importer/config.yaml index 8eadaf2d2f..8df422366d 100644 --- a/fireflyiii_fints_importer/config.yaml +++ b/fireflyiii_fints_importer/config.yaml @@ -89,5 +89,5 @@ schema: slug: fireflyiii_fints_importer udev: true url: https://github.com/alexbelgium/hassio-addons -version: 1.3.0.7 +version: 1.3.0.8 webui: "[PROTO:ssl]://[HOST]:[PORT:8080]" diff --git a/fireflyiii_fints_importer/rootfs/etc/cont-init.d/20-folders.sh b/fireflyiii_fints_importer/rootfs/etc/cont-init.d/20-folders.sh index a272ca21fd..d4d8bbb355 100755 --- a/fireflyiii_fints_importer/rootfs/etc/cont-init.d/20-folders.sh +++ b/fireflyiii_fints_importer/rootfs/etc/cont-init.d/20-folders.sh @@ -7,20 +7,13 @@ CONFIGSOURCE="/config/addons_config/fireflyiii_fints_importer" # Create directory mkdir -p "$CONFIGSOURCE" -# If no file, provide example -if [ ! "$(ls -A "${CONFIGSOURCE}")" ] && [ -f /data/configurations ]; then - cp -r /data/configurations/* "$CONFIGSOURCE"/ || true - rm -r /data/configurations +# Remove the self-referencing link created by previous versions +if [ -L "$CONFIGSOURCE/fireflyiii_fints_importer" ]; then + rm "$CONFIGSOURCE/fireflyiii_fints_importer" fi -if [ ! "$(ls -A "${CONFIGSOURCE}")" ] && [ -f /app/configurations ]; then - cp -r /app/configurations/* "$CONFIGSOURCE"/ || true - rm -r /app/configurations -fi - -ln -sf "$CONFIGSOURCE" /data/configurations -mkdir -p /app -ln -sf "$CONFIGSOURCE" /app/configurations +# The app reads data/configurations; -n replaces the link kept in /data instead of nesting a new one inside it +ln -sfn "$CONFIGSOURCE" /data/configurations # Make sure permissions are right chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"