fix(file): removed basefile prefix
This commit is contained in:
parent
a8a5408db4
commit
730d2b84e0
1 changed files with 1 additions and 6 deletions
|
|
@ -208,11 +208,7 @@ int snapshot_file(char* path, char* root, size_t basefile_id, char* hash) {
|
|||
strcat(concat_file, content[i]);
|
||||
}
|
||||
|
||||
const char* basefile_prefix = "basefile ";
|
||||
size_t prefix_len = strlen(basefile_prefix);
|
||||
size_t content_len = prefix_len + total_len;
|
||||
|
||||
char* final_content = calloc(content_len, sizeof(char));
|
||||
char* final_content = calloc(total_len, sizeof(char));
|
||||
if (!final_content) {
|
||||
free(concat_file);
|
||||
concat_file = NULL;
|
||||
|
|
@ -220,7 +216,6 @@ int snapshot_file(char* path, char* root, size_t basefile_id, char* hash) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
strcat(final_content, basefile_prefix);
|
||||
strcat(final_content, concat_file);
|
||||
|
||||
free(concat_file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue