]> gitweb.ps.run Git - ps-cgit/blobdiff - scan-tree.c
Merge branch 'lh/section-from-path'
[ps-cgit] / scan-tree.c
index 6ba9193e2e3d5c5894a5493b9db2cab328bbb095..b5b50f332b812e4afcd7622a57d84bcf653959a6 100644 (file)
@@ -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) {