snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 459ba627e673a5ec6cf17428bff951a45a663c35
parent 54144dd517f9eb0687519e8188f8d93e5a55148c
Author: default <nobody@localhost>
Date:   Mon, 17 Oct 2022 11:28:44 +0200

Updated RELEASE_NOTES.

Diffstat:
MRELEASE_NOTES.md | 2+-
Mdata.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md @@ -2,7 +2,7 @@ ## 2.06 -The purge is managed internally, so there is no longer a need to add a cron job for that. +The purge is managed internally, so there is no longer a need to add a cron job for that. If you don't want any timeline data to be purged, set `timeline_purge_days` to 0. ## 2.05 diff --git a/data.c b/data.c @@ -1028,8 +1028,6 @@ void purge(snac *snac) /* do the purge */ { int tpd = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days")); - time_t mt = time(NULL) - tpd * 24 * 3600; - char *p, *v; /* purge days set to 0? disable purging */ if (tpd == 0) { @@ -1037,8 +1035,10 @@ void purge(snac *snac) return; } + time_t mt = time(NULL) - tpd * 24 * 3600; xs *t_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir); xs *t_list = xs_glob(t_spec, 0, 0); + char *p, *v; p = t_list; while (xs_list_iter(&p, &v)) {