mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Purge unused tags completely.
This commit is contained in:
parent
c9b8f8cfef
commit
755ef0ed97
8
data.c
8
data.c
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user