public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] backup.pl: Fix Bug13799 - addon restore not working
@ 2024-12-20 10:04 Adolf Belka
  2024-12-20 10:55 ` bbitsch
  0 siblings, 1 reply; 2+ messages in thread
From: Adolf Belka @ 2024-12-20 10:04 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

- 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(a)ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch(a)ipfire.org>
Fixes: Bug13799
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 config/backup/backup.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/backup/backup.pl b/config/backup/backup.pl
index 3b10b8707..b618576e1 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
 
-- 
2.47.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] backup.pl: Fix Bug13799 - addon restore not working
  2024-12-20 10:04 [PATCH] backup.pl: Fix Bug13799 - addon restore not working Adolf Belka
@ 2024-12-20 10:55 ` bbitsch
  0 siblings, 0 replies; 2+ messages in thread
From: bbitsch @ 2024-12-20 10:55 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

Reviewed-by: Bernhard Bitsch <bbitsch(a)ipfire.org>

On 20.12.24 11:04, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
> - 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(a)ipfire.org>
> Tested-by: Bernhard Bitsch <bbitsch(a)ipfire.org>
> Fixes: Bug13799
> Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
> ---
>   config/backup/backup.pl | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/config/backup/backup.pl b/config/backup/backup.pl
> index 3b10b8707..b618576e1 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
>   
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-20 10:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-20 10:04 [PATCH] backup.pl: Fix Bug13799 - addon restore not working Adolf Belka
2024-12-20 10:55 ` bbitsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox