diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 74c9890e..a5ffc6fa 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -400,8 +400,10 @@ sub install_aux_file or fatal "rm -f $dest: $!"; } my ($temp, $tempname) = tempfile (UNLINK => 0, DIR => $destdir); - copy ($src, $tempname) + copy ($src, $temp) or fatal "copying $src to $tempname: $!"; + close ($temp) + or fatal "closing $tempname: $!"; make_executable ($tempname) if -x $src; update_file ($tempname, $dest, $force); }