aboutsummaryrefslogtreecommitdiff
path: root/scan-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'scan-tree.c')
-rw-r--r--scan-tree.c8
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
@@ -118,9 +118,11 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn)
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) {