mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 01:03:37 +00:00
Fixed a deletion error.
This commit is contained in:
parent
645e7ec43e
commit
746624144c
1 changed files with 9 additions and 1 deletions
10
data.c
10
data.c
|
@ -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 */
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue