From aabc70f74b8c334510774ecd508699c418f48a56 Mon Sep 17 00:00:00 2001
From: Dean Scarff
Date: Thu, 26 Aug 2010 15:01:20 +0800
Subject: Use absolute path for scanned repo readme

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'scan-tree.c')

diff --git a/scan-tree.c b/scan-tree.c
index dbca797..ebfd41e 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -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)) {
-- 
cgit v1.2.3-54-g00ecf