mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Purge unused tags completely.
This commit is contained in:
parent
c9b8f8cfef
commit
755ef0ed97
1 changed files with 8 additions and 0 deletions
8
data.c
8
data.c
|
@ -2537,6 +2537,14 @@ void purge_server(void)
|
||||||
tag_gc += index_gc(v2);
|
tag_gc += index_gc(v2);
|
||||||
xs *bak = xs_fmt("%s.bak", v2);
|
xs *bak = xs_fmt("%s.bak", v2);
|
||||||
unlink(bak);
|
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 a new issue