Unverified Commit 47762f55 authored by Matteo Bignotti's avatar Matteo Bignotti Committed by Daniel Stenberg
Browse files

mk-ca-bundle.pl: make -u delete certdata.txt if found not changed

certdata.txt should be deleted also when the process is interrupted by
"same certificate downloaded, exiting"

The certdata.txt is currently kept on disk even if you give the -u
option

Closes #2655
parent 0680ec9e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -377,6 +377,9 @@ my $newhash= sha256($txt);

if(!$opt_f && $oldhash eq $newhash) {
    report "Downloaded file identical to previous run\'s source file. Exiting";
    if($opt_u && -e $txt && !unlink($txt)) {
        report "Failed to remove $txt: $!\n";
    }
    exit;
}