mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Assumes also CHG blocks with a NULL hash without needing an info block.
Some refactoring and renaming of other hash functions to avoid misunderstanding.
This commit is contained in:
parent
9ad388724e
commit
e0afd0edf7
6 changed files with 50 additions and 34 deletions
2
sync.c
2
sync.c
|
|
@ -280,7 +280,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
memhash(state->hash, state->hashseed, hash, buffer[j], read_size);
|
||||
}
|
||||
|
||||
if (block_has_hash(block)) {
|
||||
if (block_has_updated_hash(block)) {
|
||||
/* compare the hash */
|
||||
if (memcmp(hash, block->hash, HASH_SIZE) != 0) {
|
||||
fprintf(stderr, "Data error in file '%s' at position '%u'\n", handle[j].path, block_file_pos(block));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue