]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids-functions.pl: Remove temporary file, if the download failed.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 21 Mar 2022 19:21:21 +0000 (20:21 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 24 Mar 2022 19:04:30 +0000 (20:04 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl

index 29d186995574e90afd7b98ffaf36518a94699327..90b7d2d7f0bc08949e242bb6b90aa8b06a89b2a3 100644 (file)
@@ -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++;
                }