summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-02-05 18:13:46 +0100
committerdefault <nobody@localhost>2023-02-05 18:13:46 +0100
commit143c73500bb2a528f2a124e0a5ca34259a44bf05 (patch)
tree4bed5b1a984a094d624ab8cc40c801687349e09e /data.c
parent9cb621641718a974f5de38696ed36333805f2397 (diff)
Reworked purge_user() to be clearer.
Diffstat (limited to 'data.c')
-rw-r--r--data.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/data.c b/data.c
index 5d4e73c..0d85efd 100644
--- a/data.c
+++ b/data.c
@@ -1575,14 +1575,15 @@ void purge_server(void)
void purge_user(snac *snac)
/* do the purge for this user */
{
- int days;
+ int priv_days, pub_days;
- days = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
- _purge_subdir(snac, "hidden", days);
- _purge_subdir(snac, "private", days);
+ priv_days = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
+ pub_days = xs_number_get(xs_dict_get(srv_config, "local_purge_days"));
- days = xs_number_get(xs_dict_get(srv_config, "local_purge_days"));
- _purge_subdir(snac, "public", days);
+ _purge_subdir(snac, "hidden", priv_days);
+ _purge_subdir(snac, "private", priv_days);
+
+ _purge_subdir(snac, "public", pub_days);
}