Disable some operations affected by hash collision

This only if we are working with a reduced hash length.
This commit is contained in:
Andrea Mazzoleni 2016-04-10 19:13:08 +02:00
parent ab7d4e896c
commit 5bf030c793
4 changed files with 31 additions and 5 deletions

View file

@ -310,6 +310,14 @@ void state_import(struct snapraid_state* state, const char* dir)
msg_progress("Importing...\n");
/* if the hash is not full */
if (BLOCK_HASH_SIZE != HASH_MAX) {
/* LCOV_EXCL_START */
log_fatal("You cannot import files when using a reduced hash.\n");
exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */
}
/* add the final slash */
pathimport(path, sizeof(path), dir);
pathslash(path, sizeof(path));