fix(firefly): prevent nested storage directories during update (#10967) (#10972)

- Remove existing backup directory before creating new backup
- Clean up temporary files after successful update
This commit is contained in:
CanbiZ (MickLesk)
2026-01-19 21:45:59 +01:00
committed by GitHub
parent 69b0e5b858
commit c8c1c454ce

View File

@@ -32,6 +32,7 @@ function update_script() {
if check_for_gh_release "firefly" "firefly-iii/firefly-iii"; then
systemctl stop apache2
cp /opt/firefly/.env /opt/.env
rm -rf /opt/storage
cp -r /opt/firefly/storage /opt/storage
if [[ -d /opt/firefly/dataimporter ]]; then
@@ -82,6 +83,7 @@ function update_script() {
chown -R www-data:www-data /opt/firefly/dataimporter
msg_ok "Updated Firefly Importer"
fi
rm -rf /opt/storage /opt/.env /opt/dataimporter.env
systemctl start apache2
msg_ok "Updated successfully!"
fi