From 304ce130fd1e19de6a4faf9834784e0d821c02c1 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Mon, 21 Mar 2022 20:21:21 +0100 Subject: [PATCH] ids-functions.pl: Remove temporary file, if the download failed. Signed-off-by: Stefan Schantl --- config/cfgroot/ids-functions.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 29d1869955..90b7d2d7f0 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -393,6 +393,9 @@ sub downloadruleset ($) { return 1; } + # Remove temporary file, if one exists. + unlink("$tmpfile") if (-e "$tmpfile"); + # Increase download attempt counter. $dl_attempt++; } -- 2.39.2