| File src/compare.c changed (mode: 100644) (index 2aa89b624..db87ce151) |
| ... |
... |
put_file_id(trie_t *trie, const char path[], const char fingerprint[], int id, |
| 837 |
837 |
|
|
| 838 |
838 |
/* Comparison by contents is the only one when we need to resolve fingerprint |
/* Comparison by contents is the only one when we need to resolve fingerprint |
| 839 |
839 |
* conflicts. */ |
* conflicts. */ |
| 840 |
|
if(ct == CT_CONTENTS) |
|
| 841 |
|
{ |
|
| 842 |
|
record->path = strdup(path); |
|
| 843 |
|
} |
|
| 844 |
|
else |
|
|
840 |
|
record->path = (ct == CT_CONTENTS ? strdup(path) : NULL); |
|
841 |
|
|
|
842 |
|
if(trie_set(trie, fingerprint, record) < 0) |
| 845 |
843 |
{ |
{ |
| 846 |
|
record->path = NULL; |
|
|
844 |
|
free(record->path); |
|
845 |
|
free(record); |
| 847 |
846 |
} |
} |
| 848 |
|
|
|
| 849 |
|
trie_set(trie, fingerprint, record); |
|
| 850 |
847 |
} |
} |
| 851 |
848 |
|
|
| 852 |
849 |
/* Frees list of compare entries. Implements data free function for |
/* Frees list of compare entries. Implements data free function for |