summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--cgit.c2
-rw-r--r--cgit.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index 3943a0f..f749b6b 100644
--- a/cgit.c
+++ b/cgit.c
@@ -178,13 +178,13 @@ static int cgit_prepare_cache(struct cacheitem *item)
if (!ctx.repo) {
item->name = xstrdup(fmt("%s/index.html", ctx.cfg.cache_root));
item->ttl = ctx.cfg.cache_root_ttl;
return 1;
}
- if (!cgit_cmd) {
+ if (!ctx.qry.page) {
item->name = xstrdup(fmt("%s/%s/index.%s.html", ctx.cfg.cache_root,
cache_safe_filename(ctx.repo->url),
cache_safe_filename(ctx.qry.raw)));
item->ttl = ctx.cfg.cache_repo_ttl;
} else {
item->name = xstrdup(fmt("%s/%s/%s/%s.html", ctx.cfg.cache_root,
diff --git a/cgit.h b/cgit.h
index b58676b..e82e9aa 100644
--- a/cgit.h
+++ b/cgit.h
@@ -186,13 +186,12 @@ struct cgit_snapshot_format {
extern const char *cgit_version;
extern struct cgit_repolist cgit_repolist;
extern struct cgit_context ctx;
extern const struct cgit_snapshot_format cgit_snapshot_formats[];
-extern int cgit_cmd;
extern struct cgit_repo *cgit_add_repo(const char *url);
extern struct cgit_repo *cgit_get_repoinfo(const char *url);
extern void cgit_repo_config_cb(const char *name, const char *value);
extern int chk_zero(int result, char *msg);