snac2

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

commit 54144dd517f9eb0687519e8188f8d93e5a55148c
parent 2253af7c42c78a0d1cd2a89de1df94dd3356c214
Author: default <nobody@localhost>
Date:   Mon, 17 Oct 2022 11:26:36 +0200

If timeline_purge_days is set to 0, purging is disabled.

Diffstat:
Mdata.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/data.c b/data.c @@ -1031,6 +1031,12 @@ void purge(snac *snac) time_t mt = time(NULL) - tpd * 24 * 3600; char *p, *v; + /* purge days set to 0? disable purging */ + if (tpd == 0) { + /* well, enjoy your data drive exploding */ + return; + } + xs *t_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir); xs *t_list = xs_glob(t_spec, 0, 0);