- char *url;
-
- if (state == 0) {
- memcpy(buffer, base, baselen);
- strcpy(buffer+baselen, pathname);
- url = cgit_pageurl(ctx.qry.repo, "tree",
- fmt("h=%s&path=%s", curr_rev, buffer));
- html("/");
- cgit_tree_link(xstrdup(pathname), NULL, NULL, ctx.qry.head,
- curr_rev, buffer);
-
- if (strcmp(match_path, buffer))
+
+ if (walk_tree_ctx->state == 0) {
+ memcpy(buffer, base->buf, base->len);
+ strcpy(buffer + base->len, pathname);
+ if (strcmp(walk_tree_ctx->match_path, buffer))