incremental_delete: read from index file so that we have parent info

This commit is contained in:
Yatao Li
2022-01-21 03:30:07 +08:00
parent e65905a165
commit 8f7edf3190
3 changed files with 42 additions and 35 deletions

View File

@@ -17,7 +17,8 @@ typedef void(*index_func)(cJSON *, const char[MD5_STR_LENGTH]);
void incremental_copy(store_t *store, store_t *dst_store, const char *filepath,
const char *dst_filepath, GHashTable *copy_table);
void incremental_delete(const char *del_filepath, GHashTable *orig_table, GHashTable *copy_table, GHashTable *new_table);
void incremental_delete(const char *del_filepath, const char* index_filepath,
GHashTable *copy_table, GHashTable *new_table);
void write_document(document_t *doc);
@@ -47,7 +48,7 @@ index_descriptor_t read_index_descriptor(char *path);
action_main_fail; \
} \
snprintf(file_path, PATH_MAX, "%s_index_original.ndjson.zst", index_path); \
if ((cond_original) && 0 == access(file_path, R_OK)) { \
if ((cond_original) && (0 == access(file_path, R_OK))) { \
action_ok; \
} \