Git.pm: Use File::Temp->tempfile instead of ->new
[gitweb.git] / git-svn.perl
index 7a1d26db8bcc451545fad2f8d55d43a5079d2302..95c6c85bbd78d678f4bb91325f8b6ea0fd020b14 100755 (executable)
@@ -3284,7 +3284,7 @@ sub close_file {
                                        my $out = syswrite($tmp_fh, $str, $res);
                                        defined($out) && $out == $res
                                                or croak("write ",
-                                                       $tmp_fh->filename,
+                                                       Git::temp_path($tmp_fh),
                                                        ": $!\n");
                                }
                                defined $res or croak $!;
@@ -3295,7 +3295,7 @@ sub close_file {
                }
 
                $hash = $::_repository->hash_and_insert_object(
-                               $fh->filename);
+                               Git::temp_path($fh));
                $hash =~ /^[a-f\d]{40}$/ or die "not a sha1: $hash\n";
 
                Git::temp_release($fb->{base}, 1);