diff options
| author | 2022-10-17 11:26:36 +0200 | |
|---|---|---|
| committer | 2022-10-17 11:26:36 +0200 | |
| commit | 54144dd517f9eb0687519e8188f8d93e5a55148c (patch) | |
| tree | 2c69f97bb9696ebd844012333f14672708c91c0e | |
| parent | Updated documentation. (diff) | |
| download | penes-snac2-54144dd517f9eb0687519e8188f8d93e5a55148c.tar.gz penes-snac2-54144dd517f9eb0687519e8188f8d93e5a55148c.tar.xz penes-snac2-54144dd517f9eb0687519e8188f8d93e5a55148c.zip | |
If timeline_purge_days is set to 0, purging is disabled.
| -rw-r--r-- | data.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -1031,6 +1031,12 @@ void purge(snac *snac) | |||
| 1031 | time_t mt = time(NULL) - tpd * 24 * 3600; | 1031 | time_t mt = time(NULL) - tpd * 24 * 3600; |
| 1032 | char *p, *v; | 1032 | char *p, *v; |
| 1033 | 1033 | ||
| 1034 | /* purge days set to 0? disable purging */ | ||
| 1035 | if (tpd == 0) { | ||
| 1036 | /* well, enjoy your data drive exploding */ | ||
| 1037 | return; | ||
| 1038 | } | ||
| 1039 | |||
| 1034 | xs *t_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir); | 1040 | xs *t_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir); |
| 1035 | xs *t_list = xs_glob(t_spec, 0, 0); | 1041 | xs *t_list = xs_glob(t_spec, 0, 0); |
| 1036 | 1042 | ||