From: Ian Campbell Date: Thu, 23 May 2013 10:00:46 +0000 (+0100) Subject: receive.pl: Define $id earlier in case of early error X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=19edecb244d78c7b2c21190f52a4fed528a6bab6;p=people%2Faperard%2Femesinae.git receive.pl: Define $id earlier in case of early error --- diff --git a/scripts/receive.pl b/scripts/receive.pl index a3ab09c..c99c277 100755 --- a/scripts/receive.pl +++ b/scripts/receive.pl @@ -54,12 +54,12 @@ my ( $sec, $min, $hour, $mday, $mon, $year ) = gmtime( $ENV{FAKE_RECEIVE_TIME} || time ); my $queue = $map; +my $id = time . $$; chdir("$c{SpoolDir}/incoming") || &failure("chdir to spool: $!"); umask(002); -my $id = time . $$; open( FILE, ">T.$id" ) || &failure("open temporary file: $!"); printf( FILE