summaryrefslogtreecommitdiffstats
path: root/src/phbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/phbs.c')
-rw-r--r--src/phbs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/phbs.c b/src/phbs.c
index b1135d8..dbc63d5 100644
--- a/src/phbs.c
+++ b/src/phbs.c
@@ -56,6 +56,7 @@
#define READ_SIZE 1024*512
extern const file_hint_t file_hint_tar;
extern file_check_list_t file_check_list;
+extern int need_to_stop;
static inline void file_recovery_cpy(file_recovery_t *dst, file_recovery_t *src)
{
@@ -100,6 +101,7 @@ pstatus_t photorec_find_blocksize(struct ph_param *params, const struct ph_optio
{
file_recovery_t file_recovery_new;
file_recovery_new.blocksize=blocksize;
+ file_recovery_new.location.start=offset;
if(file_recovery.file_stat!=NULL && file_recovery.file_stat->file_hint==&file_hint_tar &&
header_check_tar(buffer-0x200,0x200,0,&file_recovery,&file_recovery_new))
{ /* Currently saving a tar, do not check the data for know header */
@@ -202,6 +204,11 @@ pstatus_t photorec_find_blocksize(struct ph_param *params, const struct ph_optio
}
}
#endif
+ if(need_to_stop!=0)
+ {
+ log_info("PhotoRec has been stopped\n");
+ current_search_space=list_search_space;
+ }
}
} /* end while(current_search_space!=list_search_space) */
free(buffer_start);