From 782d66f4e0af30059445f4ae7d42efc670ea26c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sun, 31 May 2015 18:08:08 -0400 Subject: find bare repos and ignore read errors this will still warn us, but at least not completely crash --- gittorrentd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gittorrentd b/gittorrentd index 2383bfd..cc60339 100755 --- a/gittorrentd +++ b/gittorrentd @@ -76,7 +76,8 @@ function bpad (n, buf) { dht.on('ready', function () { // Spider all */.git dirs and announce all refs. - var repos = glob.sync('*/.git/git-daemon-export-ok') + var repos = glob.sync('*/{,.git/}git-daemon-export-ok', {strict: false}) + console.log(repos) var count = repos.length repos.forEach(function (repo) { console.log('in repo ' + repo) -- cgit v1.2.3