summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/photorec.c6
-rw-r--r--src/photorec.h2
-rw-r--r--src/psearchn.c6
-rw-r--r--src/qpsearch.cpp6
4 files changed, 10 insertions, 10 deletions
diff --git a/src/photorec.c b/src/photorec.c
index cc8892d..3a8f181 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -622,7 +622,7 @@ int file_finish(file_recovery_t *file_recovery, struct ph_param *params,
if(file_recovery->file_stat==NULL)
return 0;
if(file_recovery->handle)
- file_finish_aux(file_recovery, params, 1);
+ file_finish_aux(file_recovery, params, 2);
if(file_recovery->file_size==0)
{
list_truncate(&file_recovery->location,file_recovery->file_size);
@@ -661,12 +661,12 @@ int file_finish(file_recovery_t *file_recovery, struct ph_param *params,
0: file not recovered
1: file recovered
*/
-int file_finish2(file_recovery_t *file_recovery, struct ph_param *params, const struct ph_options *options, alloc_data_t *list_search_space)
+int file_finish2(file_recovery_t *file_recovery, struct ph_param *params, const int paranoid, alloc_data_t *list_search_space)
{
if(file_recovery->file_stat==NULL)
return 0;
if(file_recovery->handle)
- file_finish_aux(file_recovery, params, options->paranoid);
+ file_finish_aux(file_recovery, params, paranoid);
if(file_recovery->file_size==0)
{
file_block_truncate_zero(file_recovery, list_search_space);
diff --git a/src/photorec.h b/src/photorec.h
index 31598ad..406ebd2 100644
--- a/src/photorec.h
+++ b/src/photorec.h
@@ -66,7 +66,7 @@ struct ph_param
int get_prev_file_header(alloc_data_t *list_search_space, alloc_data_t **current_search_space, uint64_t *offset);
int file_finish(file_recovery_t *file_recovery, struct ph_param *params,
alloc_data_t *list_search_space, alloc_data_t **current_search_space, uint64_t *offset);
-int file_finish2(file_recovery_t *file_recovery, struct ph_param *params, const struct ph_options *options, alloc_data_t *list_search_space);
+int file_finish2(file_recovery_t *file_recovery, struct ph_param *params, const int paranoid, alloc_data_t *list_search_space);
void write_stats_log(const file_stat_t *file_stats);
void update_stats(file_stat_t *file_stats, alloc_data_t *list_search_space);
partition_t *new_whole_disk(const disk_t *disk_car);
diff --git a/src/psearchn.c b/src/psearchn.c
index 9c9ffa1..581c1a8 100644
--- a/src/psearchn.c
+++ b/src/psearchn.c
@@ -210,7 +210,7 @@ pstatus_t photorec_aux(struct ph_param *params, const struct ph_options *options
{
if(options->verbose > 1)
log_trace("A known header has been found, recovery of the previous file is finished\n");
- file_recovered=file_finish2(&file_recovery, params, options, list_search_space);
+ file_recovered=file_finish2(&file_recovery, params, options->paranoid, list_search_space);
if(options->lowmem > 0)
forget(list_search_space,current_search_space);
}
@@ -330,7 +330,7 @@ pstatus_t photorec_aux(struct ph_param *params, const struct ph_options *options
}
if(res==DC_STOP || res==DC_ERROR)
{
- file_recovered=file_finish2(&file_recovery, params, options, list_search_space);
+ file_recovered=file_finish2(&file_recovery, params, options->paranoid, list_search_space);
if(options->lowmem > 0)
forget(list_search_space,current_search_space);
}
@@ -366,7 +366,7 @@ pstatus_t photorec_aux(struct ph_param *params, const struct ph_options *options
current_search_space, current_search_space->list.prev, current_search_space->list.next);
log_trace("End of media\n");
#endif
- file_recovered=file_finish2(&file_recovery, params, options, list_search_space);
+ file_recovered=file_finish2(&file_recovery, params, options->paranoid, list_search_space);
if(options->lowmem > 0)
forget(list_search_space,current_search_space);
}
diff --git a/src/qpsearch.cpp b/src/qpsearch.cpp
index 166fdb5..cc88f7d 100644
--- a/src/qpsearch.cpp
+++ b/src/qpsearch.cpp
@@ -206,7 +206,7 @@ pstatus_t QPhotorec::photorec_aux(alloc_data_t *list_search_space)
{
if(options->verbose > 1)
log_trace("A known header has been found, recovery of the previous file is finished\n");
- file_recovered=file_finish2(&file_recovery, params, options, list_search_space);
+ file_recovered=file_finish2(&file_recovery, params, options->paranoid, list_search_space);
if(options->lowmem > 0)
forget(list_search_space,current_search_space);
}
@@ -326,7 +326,7 @@ pstatus_t QPhotorec::photorec_aux(alloc_data_t *list_search_space)
}
if(res==DC_STOP || res==DC_ERROR)
{
- file_recovered=file_finish2(&file_recovery, params, options, list_search_space);
+ file_recovered=file_finish2(&file_recovery, params, options->paranoid, list_search_space);
if(options->lowmem > 0)
forget(list_search_space,current_search_space);
}
@@ -362,7 +362,7 @@ pstatus_t QPhotorec::photorec_aux(alloc_data_t *list_search_space)
current_search_space, current_search_space->list.prev, current_search_space->list.next);
log_trace("End of media\n");
#endif
- file_recovered=file_finish2(&file_recovery, params, options, list_search_space);
+ file_recovered=file_finish2(&file_recovery, params, options->paranoid, list_search_space);
if(options->lowmem > 0)
forget(list_search_space,current_search_space);
}