summaryrefslogtreecommitdiffabout
path: root/scan-tree.c
Unidiff
Diffstat (limited to 'scan-tree.c') (more/less context) (ignore whitespace changes)
-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)
118 if (!stat(p, &st)) 118 if (!stat(p, &st))
119 readfile(p, &repo->desc, &size); 119 readfile(p, &repo->desc, &size);
120 120
121 p = fmt("%s/README.html", path); 121 if (!repo->readme) {
122 if (!stat(p, &st)) 122 p = fmt("%s/README.html", path);
123 repo->readme = "README.html"; 123 if (!stat(p, &st))
124 repo->readme = "README.html";
125 }
124 if (ctx.cfg.section_from_path) { 126 if (ctx.cfg.section_from_path) {
125 n = ctx.cfg.section_from_path; 127 n = ctx.cfg.section_from_path;
126 if (n > 0) { 128 if (n > 0) {