[PATCH] Added trailing slash to directories

Lauri Niskanen ape at ape3000.com
Sat Jan 14 17:26:27 CET 2012


On 05/11/11 00:50, Lauri Niskanen wrote:
> Hello!
>
> I think the directories in the tree view are not clearly distinguishable
> from other files. I added a trailing slash to the directories and now
> they look a lot better.
>
> We could also sort the folders to the top of the list. This, however, is
> not included in this patch.
>
>  From 71a0620110c505b6806119a9e32e6a6343edbffc Mon Sep 17 00:00:00 2001
> From: Lauri Niskanen <ape at ape3000.com>
> Date: Sat, 5 Nov 2011 00:41:39 +0200
> Subject: [PATCH] Added trailing slash to directories
>
> - This only affects the tree view
> ---
> ui-tree.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/ui-tree.c b/ui-tree.c
> index 442b6be..6428fec 100644
> --- a/ui-tree.c
> +++ b/ui-tree.c
> @@ -158,6 +158,7 @@ static int ls_item(const unsigned char *sha1, const
> char *base, int baselen,
> html_txt(name);
> html("</a>");
> } else if (S_ISDIR(mode)) {
> + name = strcat(name, "/");
> cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head,
> curr_rev, fullpath);
> } else {

Does anybody have any comments about this patch?

-- 
Ape <Lauri Niskanen>




More information about the CGit mailing list