-rw-r--r-- | ui-repolist.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 1fe7059..7090c12 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -18,26 +18,29 @@ void cgit_print_repolist(struct cacheitem *item) | |||
18 | chdir(cgit_root); | 18 | chdir(cgit_root); |
19 | cgit_print_docstart(cgit_root_title, item); | 19 | cgit_print_docstart(cgit_root_title, item); |
20 | cgit_print_pageheader(cgit_root_title); | 20 | cgit_print_pageheader(cgit_root_title); |
21 | 21 | ||
22 | if (!(d = opendir("."))) { | 22 | if (!(d = opendir("."))) { |
23 | cgit_print_error(fmt("Unable to scan repository directory: %s", | 23 | cgit_print_error(fmt("Unable to scan repository directory: %s", |
24 | strerror(errno))); | 24 | strerror(errno))); |
25 | cgit_print_docend(); | 25 | cgit_print_docend(); |
26 | return; | 26 | return; |
27 | } | 27 | } |
28 | 28 | ||
29 | html("<h2>Repositories</h2>\n"); | 29 | html("<h2>Repositories</h2>\n"); |
30 | html("<table class='list'>"); | 30 | html("<table class='list nowrap'>"); |
31 | html("<tr><th>Name</th><th>Description</th><th>Owner</th></tr>\n"); | 31 | html("<tr>" |
32 | "<th class='left'>Name</th>" | ||
33 | "<th class='left'>Description</th>" | ||
34 | "<th class='left'>Owner</th></tr>\n"); | ||
32 | while ((de = readdir(d)) != NULL) { | 35 | while ((de = readdir(d)) != NULL) { |
33 | if (de->d_name[0] == '.') | 36 | if (de->d_name[0] == '.') |
34 | continue; | 37 | continue; |
35 | if (stat(de->d_name, &st) < 0) | 38 | if (stat(de->d_name, &st) < 0) |
36 | continue; | 39 | continue; |
37 | if (!S_ISDIR(st.st_mode)) | 40 | if (!S_ISDIR(st.st_mode)) |
38 | continue; | 41 | continue; |
39 | 42 | ||
40 | cgit_repo_name = cgit_repo_desc = cgit_repo_owner = NULL; | 43 | cgit_repo_name = cgit_repo_desc = cgit_repo_owner = NULL; |
41 | name = fmt("%s/info/cgit", de->d_name); | 44 | name = fmt("%s/info/cgit", de->d_name); |
42 | if (cgit_read_config(name, cgit_repo_config_cb)) | 45 | if (cgit_read_config(name, cgit_repo_config_cb)) |
43 | continue; | 46 | continue; |