diff options
author | Matteo Bignotti <gugoll@gmail.com> | 2018-06-13 13:45:23 -0700 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-06-14 00:02:20 +0200 |
commit | 47762f55839268213cc79708b51edd7cbef2893a (patch) | |
tree | 2090eb4bd1dcefcfdef769329e3c40e7d5e859d1 /lib/mk-ca-bundle.pl | |
parent | 0680ec9e2c3e13c28eb5ca69de7477d417b2169c (diff) | |
download | curl-47762f55839268213cc79708b51edd7cbef2893a.tar.gz |
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
Diffstat (limited to 'lib/mk-ca-bundle.pl')
-rwxr-xr-x | lib/mk-ca-bundle.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 3dc5b6538..33977f322 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -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; } |