fix(basefile): made sure file_info.hash is null instead of random memory
This commit is contained in:
parent
8831b267e5
commit
3e0a0d7057
1 changed files with 1 additions and 2 deletions
|
|
@ -266,8 +266,6 @@ int write_base_file_list(BaseFileBuffer* buffer, char* info_file) {
|
||||||
info->name, info->base_num, info->diff_num);
|
info->name, info->base_num, info->diff_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s\n", tmp);
|
|
||||||
|
|
||||||
FILE* fp = fopen(info_file, "wb");
|
FILE* fp = fopen(info_file, "wb");
|
||||||
if (!fp) { perror("ERROR: cannot open path in snapshot_tree!\n"); return 0; }
|
if (!fp) { perror("ERROR: cannot open path in snapshot_tree!\n"); return 0; }
|
||||||
|
|
||||||
|
|
@ -316,6 +314,7 @@ FileInfoBuffer* basefilebuffer_to_fileinfobuffer(BaseFileBuffer* base_buffer) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
file_info.mode = st.st_mode;
|
file_info.mode = st.st_mode;
|
||||||
|
file_info.hash = NULL;
|
||||||
|
|
||||||
if (!file_info_buffer_push(file_buffer, file_info)) {
|
if (!file_info_buffer_push(file_buffer, file_info)) {
|
||||||
free(file_info.name);
|
free(file_info.name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue