]> gitweb.ps.run Git - ps-cgit/blobdiff - scan-tree.c
Add support for "readme" option
[ps-cgit] / scan-tree.c
index e9878248346eaf8d48f6a5c8d3053fcf51d5270c..780d405425b283d096dda4dd86b89bcee5028f76 100644 (file)
@@ -110,9 +110,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";
+       }
 
        p = fmt("%s/cgitrc", path);
        if (!stat(p, &st)) {