From: Adolf Belka Date: Fri, 20 Dec 2024 10:04:05 +0000 (+0100) Subject: backup.pl: Fix Bug13799 - addon restore not working X-Git-Tag: v2.29-core191~14^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b630334147324d5e05c38acc5b428e67f01b9f87;p=ipfire-2.x.git backup.pl: Fix Bug13799 - addon restore not working - This fixes the existence check for the addon .ipf file from a check of existence of a directory to a check of existence of a file. Suggested-by: Bernhard Bitsch Tested-by: Bernhard Bitsch Fixes: Bug13799 Signed-off-by: Adolf Belka Reviewed-by: Bernhard Bitsch Signed-off-by: Arne Fitzenreiter --- diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 3b10b87076..b618576e15 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -285,7 +285,7 @@ make_addon_backup() { restore_addon_backup() { local name="${1}" - if [ -d "/tmp/${name}.ipf" ]; then + if [ -e "/tmp/${name}.ipf" ]; then mv "/tmp/${name}.ipf" "/var/ipfire/backup/addons/backup/${name}.ipf" fi