]> gitweb.ps.run Git - ps-cgit/blobdiff - scan-tree.c
implement repo.logo and repo.logo-link
[ps-cgit] / scan-tree.c
index 6ba9193e2e3d5c5894a5493b9db2cab328bbb095..a0e09ceac4212c1f8a07ca391d6bc67d6b0cb438 100644 (file)
@@ -81,6 +81,10 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn)
                        path, strerror(errno), errno);
                return;
        }
+
+       if (ctx.cfg.strict_export && stat(fmt("%s/%s", path, ctx.cfg.strict_export), &st))
+               return;
+
        if (!stat(fmt("%s/noweb", path), &st))
                return;
 
@@ -118,9 +122,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) {