diff options
| -rw-r--r-- | data.c | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -241,7 +241,7 @@ int index_add(const char *fn, const char *id) | |||
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | 243 | ||
| 244 | int index_del(const char *fn, const char *md5) | 244 | int 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 | ||
| 282 | int 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 | |||
| 282 | int index_in_md5(const char *fn, const char *md5) | 290 | int 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 | { |