summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2022-10-17 11:28:44 +0200
committerGravatar default2022-10-17 11:28:44 +0200
commit459ba627e673a5ec6cf17428bff951a45a663c35 (patch)
tree4e03bf70944212287becbf543a42717f242fcec4 /data.c
parentIf timeline_purge_days is set to 0, purging is disabled. (diff)
downloadsnac2-459ba627e673a5ec6cf17428bff951a45a663c35.tar.gz
snac2-459ba627e673a5ec6cf17428bff951a45a663c35.tar.xz
snac2-459ba627e673a5ec6cf17428bff951a45a663c35.zip
Updated RELEASE_NOTES.
Diffstat (limited to '')
-rw-r--r--data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/data.c b/data.c
index 92e7f45..e179fe3 100644
--- a/data.c
+++ b/data.c
@@ -1028,8 +1028,6 @@ void purge(snac *snac)
1028/* do the purge */ 1028/* do the purge */
1029{ 1029{
1030 int tpd = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days")); 1030 int tpd = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
1031 time_t mt = time(NULL) - tpd * 24 * 3600;
1032 char *p, *v;
1033 1031
1034 /* purge days set to 0? disable purging */ 1032 /* purge days set to 0? disable purging */
1035 if (tpd == 0) { 1033 if (tpd == 0) {
@@ -1037,8 +1035,10 @@ void purge(snac *snac)
1037 return; 1035 return;
1038 } 1036 }
1039 1037
1038 time_t mt = time(NULL) - tpd * 24 * 3600;
1040 xs *t_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir); 1039 xs *t_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir);
1041 xs *t_list = xs_glob(t_spec, 0, 0); 1040 xs *t_list = xs_glob(t_spec, 0, 0);
1041 char *p, *v;
1042 1042
1043 p = t_list; 1043 p = t_list;
1044 while (xs_list_iter(&p, &v)) { 1044 while (xs_list_iter(&p, &v)) {