]> Sergey Matveev's repositories - public-inbox.git/blobdiff - script/public-inbox-init
www: rework async_* to use method table
[public-inbox.git] / script / public-inbox-init
index 951338af019524cd1c4ce75a35aa78a468fd2803..b8d71f3512d2997736274a23921fe8f1ec91c04d 100755 (executable)
@@ -53,6 +53,7 @@ PublicInbox::Lock::lock_acquire($lock_obj);
 
 # git-config will operate on this (and rename on success):
 my ($fh, $pi_config_tmp) = tempfile('pi-init-XXXXXXXX', DIR => $dir);
+my $cfg_tmp = UnlinkMe->new($pi_config_tmp);
 
 # Now, we grab another lock to use git-config(1) locking, so it won't
 # wait on the lock, unlike some of our internal flock()-based locks.
@@ -176,6 +177,7 @@ if (defined $perm) {
 
 rename $pi_config_tmp, $pi_config or
        die "failed to rename `$pi_config_tmp' to `$pi_config': $!\n";
+delete $cfg_tmp->{file};
 $auto_unlink->DESTROY;
 
 package UnlinkMe;