diff options
| author | Antoine Beaupré <anarcat@koumbit.org> | 2015-05-31 18:08:08 -0400 |
|---|---|---|
| committer | Antoine Beaupré <anarcat@koumbit.org> | 2015-05-31 18:45:29 -0400 |
| commit | 782d66f4e0af30059445f4ae7d42efc670ea26c5 (patch) | |
| tree | d2e56438d9af3ddefc12b4ab391dcc07b8910b89 /gittorrentd | |
| parent | 3c29320fd5c9e9d4ea2b4936fead9046b6a96534 (diff) | |
find bare repos and ignore read errors
this will still warn us, but at least not completely crash
Diffstat (limited to 'gittorrentd')
| -rwxr-xr-x | gittorrentd | 3 |
1 files changed, 2 insertions, 1 deletions
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) |
