summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/data.c b/data.c
index eeda333..9f79c13 100644
--- a/data.c
+++ b/data.c
@@ -241,7 +241,7 @@ int index_add(const char *fn, const char *id)
241} 241}
242 242
243 243
244int index_del(const char *fn, const char *md5) 244int index_del_md5(const char *fn, const char *md5)
245/* deletes an md5 from an index */ 245/* deletes an md5 from an index */
246{ 246{
247 int status = 404; 247 int status = 404;
@@ -279,6 +279,14 @@ int index_del(const char *fn, const char *md5)
279} 279}
280 280
281 281
282int index_del(const char *fn, const char *id)
283/* deletes an id from an index */
284{
285 xs *md5 = xs_md5_hex(id, strlen(id));
286 return index_del_md5(fn, md5);
287}
288
289
282int index_in_md5(const char *fn, const char *md5) 290int index_in_md5(const char *fn, const char *md5)
283/* checks if the md5 is already in the index */ 291/* checks if the md5 is already in the index */
284{ 292{