diff options
author | default <nobody@localhost> | 2023-12-08 08:34:51 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-12-08 08:34:51 +0100 |
commit | 755ef0ed9734c9b40809aafc687e673c3e7fabe3 (patch) | |
tree | 73e3a693cfc4e879c1911223b394ff8a522206c8 /data.c | |
parent | c9b8f8cfef97f641015ab345fba81c074a8245b9 (diff) |
Purge unused tags completely.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2537,6 +2537,14 @@ void purge_server(void) tag_gc += index_gc(v2); xs *bak = xs_fmt("%s.bak", v2); unlink(bak); + + if (index_len(v2) == 0) { + /* there are no longer any entry with this tag; + purge it completely */ + unlink(v2); + xs *dottag = xs_replace(v2, ".idx", ".tag"); + unlink(dottag); + } } } |