diff options
author | Richard Levitte <levitte@openssl.org> | 2018-03-13 21:55:52 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-03-13 22:18:10 +0100 |
commit | 18f8e443738f22f59556aa4dde91f3fdcc324b4e (patch) | |
tree | 2ea49a32822572d9398f195468233ac722ef7380 /util/add-depends.pl | |
parent | 4ba5ce651790264cdd0e1af3564cf68f8be9ac81 (diff) |
Remove the temporary file in case it wasn't renamed
... also, name it with "-$$" added instead of ".$$"
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5608)
Diffstat (limited to 'util/add-depends.pl')
-rw-r--r-- | util/add-depends.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/add-depends.pl b/util/add-depends.pl index 9a57da23a2..573986d686 100644 --- a/util/add-depends.pl +++ b/util/add-depends.pl @@ -12,7 +12,7 @@ use configdata; use File::Compare qw(compare_text); my $buildfile = $config{build_file}; -my $buildfile_new = "$buildfile.$$"; +my $buildfile_new = "$buildfile-$$"; my $depext = $target{dep_extension} || ".d"; my @deps = grep { -f $_ } @@ -45,4 +45,6 @@ if (compare_text($buildfile_new, $buildfile) != 0) { rename $buildfile_new, $buildfile or die "Trying to rename $buildfile_new -> $buildfile: $!\n"; } - +# On VMS, we want to remove all generations of this file, in case there are +# more than one +while (unlink $buildfile_new) {} |