diff options
| author | 2023-02-05 18:13:46 +0100 | |
|---|---|---|
| committer | 2023-02-05 18:13:46 +0100 | |
| commit | 143c73500bb2a528f2a124e0a5ca34259a44bf05 (patch) | |
| tree | 4bed5b1a984a094d624ab8cc40c801687349e09e /data.c | |
| parent | timeline_get_by_md5() reads from the user cachedirs instead of the global obj... (diff) | |
| download | snac2-143c73500bb2a528f2a124e0a5ca34259a44bf05.tar.gz snac2-143c73500bb2a528f2a124e0a5ca34259a44bf05.tar.xz snac2-143c73500bb2a528f2a124e0a5ca34259a44bf05.zip | |
Reworked purge_user() to be clearer.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 13 |
1 files changed, 7 insertions, 6 deletions
| @@ -1575,14 +1575,15 @@ void purge_server(void) | |||
| 1575 | void purge_user(snac *snac) | 1575 | void purge_user(snac *snac) |
| 1576 | /* do the purge for this user */ | 1576 | /* do the purge for this user */ |
| 1577 | { | 1577 | { |
| 1578 | int days; | 1578 | int priv_days, pub_days; |
| 1579 | 1579 | ||
| 1580 | days = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days")); | 1580 | priv_days = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days")); |
| 1581 | _purge_subdir(snac, "hidden", days); | 1581 | pub_days = xs_number_get(xs_dict_get(srv_config, "local_purge_days")); |
| 1582 | _purge_subdir(snac, "private", days); | ||
| 1583 | 1582 | ||
| 1584 | days = xs_number_get(xs_dict_get(srv_config, "local_purge_days")); | 1583 | _purge_subdir(snac, "hidden", priv_days); |
| 1585 | _purge_subdir(snac, "public", days); | 1584 | _purge_subdir(snac, "private", priv_days); |
| 1585 | |||
| 1586 | _purge_subdir(snac, "public", pub_days); | ||
| 1586 | } | 1587 | } |
| 1587 | 1588 | ||
| 1588 | 1589 | ||