-rw-r--r-- | scan-tree.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scan-tree.c b/scan-tree.c index 6ba9193..b5b50f3 100644 --- a/scan-tree.c +++ b/scan-tree.c @@ -115,15 +115,17 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn) repo->owner = owner; p = fmt("%s/description", path); if (!stat(p, &st)) readfile(p, &repo->desc, &size); - p = fmt("%s/README.html", path); - if (!stat(p, &st)) - repo->readme = "README.html"; + if (!repo->readme) { + p = fmt("%s/README.html", path); + if (!stat(p, &st)) + repo->readme = "README.html"; + } if (ctx.cfg.section_from_path) { n = ctx.cfg.section_from_path; if (n > 0) { slash = rel; while (slash && n && (slash = strchr(slash, '/'))) n--; |