diff options
| author | 2022-10-17 11:28:44 +0200 | |
|---|---|---|
| committer | 2022-10-17 11:28:44 +0200 | |
| commit | 459ba627e673a5ec6cf17428bff951a45a663c35 (patch) | |
| tree | 4e03bf70944212287becbf543a42717f242fcec4 /data.c | |
| parent | If timeline_purge_days is set to 0, purging is disabled. (diff) | |
| download | snac2-459ba627e673a5ec6cf17428bff951a45a663c35.tar.gz snac2-459ba627e673a5ec6cf17428bff951a45a663c35.tar.xz snac2-459ba627e673a5ec6cf17428bff951a45a663c35.zip | |
Updated RELEASE_NOTES.
Diffstat (limited to '')
| -rw-r--r-- | data.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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)) { |