chiark / gitweb /
dgit-repos-server: tolerate missing _tmp in cleanup
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 22 Jan 2014 18:34:45 +0000 (18:34 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Mar 2014 18:29:04 +0000 (18:29 +0000)
dgit-repos-server

index 2cbb4e7..aab35d3 100755 (executable)
@@ -487,7 +487,10 @@ sub unlockall () {
 
 sub cleanup () {
     unlockall();
-    chdir "$dgitrepos/_tmp" or die $!;
+    if (!chdir "$dgitrepos/_tmp") {
+       $!==ENOENT or die $!;
+       return;
+    }
     foreach my $lf (<*.lock>) {
        my $tree = $lf;
        $tree =~ s/\.lock$//;