mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-12 21:10:22 +03:00
If timeline_purge_days is set to 0, purging is disabled.
This commit is contained in:
parent
2253af7c42
commit
54144dd517
6
data.c
6
data.c
@ -1031,6 +1031,12 @@ void purge(snac *snac)
|
|||||||
time_t mt = time(NULL) - tpd * 24 * 3600;
|
time_t mt = time(NULL) - tpd * 24 * 3600;
|
||||||
char *p, *v;
|
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_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir);
|
||||||
xs *t_list = xs_glob(t_spec, 0, 0);
|
xs *t_list = xs_glob(t_spec, 0, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user