X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/83a5f35a2724ee60bfd8c5679b98da7008272254..06c81d6faafff1c80bc9e2302e5b8fea393b775b:/cgit.c diff --git a/cgit.c b/cgit.c index d975570..9535abc 100644 --- a/cgit.c +++ b/cgit.c @@ -22,7 +22,7 @@ static void cgit_prepare_cache(struct cacheitem *item) } else { item->name = xstrdup(fmt("%s/%s/%s/%s.html", cgit_cache_root, cgit_query_repo, cgit_query_page, - cgit_querystring)); + cache_safe_filename(cgit_querystring))); if (cgit_query_has_symref) item->ttl = cgit_cache_dynamic_ttl; else if (cgit_query_has_sha1) @@ -56,7 +56,7 @@ static void cgit_print_repo_page(struct cacheitem *item) } else if (!strcmp(cgit_query_page, "log")) { cgit_print_log(cgit_query_head, cgit_query_ofs, 100, cgit_query_search); } else if (!strcmp(cgit_query_page, "tree")) { - cgit_print_tree(cgit_query_sha1); + cgit_print_tree(cgit_query_sha1, cgit_query_path); } else if (!strcmp(cgit_query_page, "commit")) { cgit_print_commit(cgit_query_sha1); } else if (!strcmp(cgit_query_page, "view")) {