From b9517ae4a37ea6aaf064753fb80038661db3628a Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 26 Feb 2013 20:26:57 +0100 Subject: [PATCH] Tries to recover also files without any valid hash. --- check.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/check.c b/check.c index 687c6538..98778ee8 100644 --- a/check.c +++ b/check.c @@ -438,7 +438,10 @@ static int state_check_process(struct snapraid_state* state, int check, int fix, struct snapraid_block* block = BLOCK_EMPTY; if (handle[j].disk) block = disk_block_get(handle[j].disk, i); - if (block_has_hash(block) /* only if the block is hashed */ + + /* try to recover all files, even the ones without hash */ + /* because in some cases we can recover also them */ + if (block_has_file(block) && !file_flag_has(block_file_get(block), FILE_IS_EXCLUDED) /* only if the file is not filtered out */ ) { one_tocheck = 1; @@ -468,7 +471,10 @@ static int state_check_process(struct snapraid_state* state, int check, int fix, struct snapraid_block* block = BLOCK_EMPTY; if (handle[j].disk) block = disk_block_get(handle[j].disk, i); - if (block_has_hash(block) /* only if the block is hashed */ + + /* try to recover all files, even the ones without hash */ + /* because in some cases we can recover also them */ + if (block_has_file(block) && !file_flag_has(block_file_get(block), FILE_IS_EXCLUDED) /* only if the file is not filtered out */ ) { one_tocheck = 1;