Kaynağa Gözat

Fixed a deletion error.

default 3 yıl önce
ebeveyn
işleme
746624144c
1 değiştirilmiş dosya ile 9 ekleme ve 1 silme
  1. 9 1
      data.c

+ 9 - 1
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 */
 {