chiark / gitweb /
git-cache-proxy: housekeeping: check errno value from stat after deletion
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 28 Jul 2014 14:24:17 +0000 (15:24 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 28 Jul 2014 14:24:17 +0000 (15:24 +0100)
scripts/git-cache-proxy

index 0c6ba55..b0c9502 100755 (executable)
@@ -423,6 +423,8 @@ sub housekeeping () {
                        logm 'info', "problem deleting: $file: $message";
                    }
                    die "$dir: problem deleting file(s)\n";
+               } elsif ($! != ENOENT) {
+                   die "$tdir: cannot stat after deletion: $!\n";
                }
            }
        };