Fixed a deletion error.

This commit is contained in:
default 2022-12-14 05:36:30 +01:00
parent 645e7ec43e
commit 746624144c

10
data.c
View File

@ -241,7 +241,7 @@ int index_add(const char *fn, const char *id)
}
int index_del(const char *fn, const char *md5)
int index_del_md5(const char *fn, const char *md5)
/* deletes an md5 from an index */
{
int status = 404;
@ -279,6 +279,14 @@ int index_del(const char *fn, const char *md5)
}
int index_del(const char *fn, const char *id)
/* deletes an id from an index */
{
xs *md5 = xs_md5_hex(id, strlen(id));
return index_del_md5(fn, md5);
}
int index_in_md5(const char *fn, const char *md5)
/* checks if the md5 is already in the index */
{