mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Renamed cached file _timeline.html to timeline.html_ to exclude it from globs.
This commit is contained in:
parent
6f792631bc
commit
36a46f3996
1 changed files with 5 additions and 5 deletions
10
html.c
10
html.c
|
@ -809,10 +809,10 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
|
||||||
if (!login(&snac, req))
|
if (!login(&snac, req))
|
||||||
status = 401;
|
status = 401;
|
||||||
else {
|
else {
|
||||||
if (history_mtime(&snac, "_timeline.html") > timeline_mtime(&snac)) {
|
if (history_mtime(&snac, "timeline.html_") > timeline_mtime(&snac)) {
|
||||||
snac_debug(&snac, 1, xs_fmt("serving cached timeline"));
|
snac_debug(&snac, 1, xs_fmt("serving cached timeline"));
|
||||||
|
|
||||||
*body = history_get(&snac, "_timeline.html");
|
*body = history_get(&snac, "timeline.html_");
|
||||||
*b_size = strlen(*body);
|
*b_size = strlen(*body);
|
||||||
status = 200;
|
status = 200;
|
||||||
}
|
}
|
||||||
|
@ -825,7 +825,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
|
||||||
*b_size = strlen(*body);
|
*b_size = strlen(*body);
|
||||||
status = 200;
|
status = 200;
|
||||||
|
|
||||||
history_add(&snac, "_timeline.html", *body, *b_size);
|
history_add(&snac, "timeline.html_", *body, *b_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1000,7 +1000,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
||||||
|
|
||||||
/* delete the cached timeline */
|
/* delete the cached timeline */
|
||||||
if (status == 303)
|
if (status == 303)
|
||||||
history_del(&snac, "_timeline.html");
|
history_del(&snac, "timeline.html_");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (p_path && strcmp(p_path, "admin/user-setup") == 0) {
|
if (p_path && strcmp(p_path, "admin/user-setup") == 0) {
|
||||||
|
@ -1037,7 +1037,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
||||||
else
|
else
|
||||||
rename(bfn, fn);
|
rename(bfn, fn);
|
||||||
|
|
||||||
history_del(&snac, "_timeline.html");
|
history_del(&snac, "timeline.html_");
|
||||||
|
|
||||||
xs *a_msg = msg_actor(&snac);
|
xs *a_msg = msg_actor(&snac);
|
||||||
xs *u_msg = msg_update(&snac, a_msg);
|
xs *u_msg = msg_update(&snac, a_msg);
|
||||||
|
|
Loading…
Reference in a new issue