diff options
| author | 2024-04-30 09:14:03 +0200 | |
|---|---|---|
| committer | 2024-04-30 09:14:03 +0200 | |
| commit | 96830967e15bd6b1a89686c8c729b096ae6c4550 (patch) | |
| tree | f596783239dbaa8daa6eae29f457682075ee40a2 | |
| parent | More tweaks to mastoapi lists. (diff) | |
| download | snac2-96830967e15bd6b1a89686c8c729b096ae6c4550.tar.gz snac2-96830967e15bd6b1a89686c8c729b096ae6c4550.tar.xz snac2-96830967e15bd6b1a89686c8c729b096ae6c4550.zip | |
Also purge lists.
| -rw-r--r-- | data.c | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -3012,6 +3012,19 @@ void purge_user(snac *snac) | |||
| 3012 | srv_debug(1, xs_fmt("purge: %s %d", idx, gc)); | 3012 | srv_debug(1, xs_fmt("purge: %s %d", idx, gc)); |
| 3013 | } | 3013 | } |
| 3014 | 3014 | ||
| 3015 | /* purge lists */ | ||
| 3016 | { | ||
| 3017 | xs *spec = xs_fmt("%s/list/" "*.idx", snac->basedir); | ||
| 3018 | xs *lol = xs_glob(spec, 0, 0); | ||
| 3019 | int c = 0; | ||
| 3020 | char *v; | ||
| 3021 | |||
| 3022 | while (xs_list_next(lol, &v, &c)) { | ||
| 3023 | int gc = index_gc(v); | ||
| 3024 | srv_debug(1, xs_fmt("purge: %s %d", v, gc)); | ||
| 3025 | } | ||
| 3026 | } | ||
| 3027 | |||
| 3015 | /* unrelated to purging, but it's a janitorial process, so what the hell */ | 3028 | /* unrelated to purging, but it's a janitorial process, so what the hell */ |
| 3016 | verify_links(snac); | 3029 | verify_links(snac); |
| 3017 | } | 3030 | } |