]> git.cameronkatri.com Git - cgit.git/commitdiff
Use absolute path for scanned repo readme
authorDean Scarff <dos@scarff.id.au>
Thu, 26 Aug 2010 07:01:20 +0000 (15:01 +0800)
committerLars Hjemli <hjemli@gmail.com>
Sun, 7 Nov 2010 15:21:59 +0000 (16:21 +0100)
repo.readme is transformed to an absolute path when read from the config,
so add_repo needs to add "README.html" with the repository path too.

Signed-off-by: Dean Scarff <dos@scarff.id.au>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
scan-tree.c

index dbca7971105ae17732267822abe7049e98f2f523..ebfd41e5f16c8fc83b8ea17a9634eaf607a8ddb3 100644 (file)
@@ -83,7 +83,7 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn)
 
        p = fmt("%s/README.html", path);
        if (!stat(p, &st))
-               repo->readme = "README.html";
+               repo->readme = xstrdup(p);
 
        p = fmt("%s/cgitrc", path);
        if (!stat(p, &st)) {