]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
receive.pl: Define $id earlier in case of early error
authorIan Campbell <ian.campbell@citrix.com>
Thu, 23 May 2013 10:00:46 +0000 (11:00 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 23 May 2013 10:47:02 +0000 (11:47 +0100)
scripts/receive.pl

index a3ab09cfcd1e6a7e60200c413886326284c35115..c99c277ca2ad7723d526cd132bf56cb56b59afda 100755 (executable)
@@ -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