commit 143c735

default  ·  2023-02-05 17:13:46 +0000 UTC
parent 9cb6216
Reworked purge_user() to be clearer.
1 files changed,  +7, -6
M data.c
M data.c
+7, -6
 1@@ -1575,14 +1575,15 @@ void purge_server(void)
 2 void purge_user(snac *snac)
 3 /* do the purge for this user */
 4 {
 5-    int days;
 6+    int priv_days, pub_days;
 7 
 8-    days = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
 9-    _purge_subdir(snac, "hidden", days);
10-    _purge_subdir(snac, "private", days);
11+    priv_days = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
12+    pub_days  = xs_number_get(xs_dict_get(srv_config, "local_purge_days"));
13 
14-    days = xs_number_get(xs_dict_get(srv_config, "local_purge_days"));
15-    _purge_subdir(snac, "public", days);
16+    _purge_subdir(snac, "hidden",  priv_days);
17+    _purge_subdir(snac, "private", priv_days);
18+
19+    _purge_subdir(snac, "public",  pub_days);
20 }
21 
22