]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
backup.pl: Fix Bug13799 - addon restore not working
authorAdolf Belka <adolf.belka@ipfire.org>
Fri, 20 Dec 2024 10:04:05 +0000 (11:04 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 23 Dec 2024 16:13:06 +0000 (17:13 +0100)
- 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 <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Fixes: Bug13799
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/backup/backup.pl

index 3b10b870763d3a8cb1b402944d6111041a485b1f..b618576e1536e4db72a3c63618f3b6bd7122a9b5 100644 (file)
@@ -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