summaryrefslogtreecommitdiffstats
path: root/src/phbf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-06-02 20:53:27 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-06-02 20:53:27 +0200
commite0d5e35d6b15ae0e5a55252d6d8af09472e3b0c1 (patch)
tree18af714b226e2533ab4f4d6348decd848c4032b4 /src/phbf.c
parent0371a41375680c584c332524032441d47710f6ab (diff)
PhotoRec: workaroud in progress bar when time goes backward
Diffstat (limited to 'src/phbf.c')
-rw-r--r--src/phbf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/phbf.c b/src/phbf.c
index 198d5eb..45be7e6 100644
--- a/src/phbf.c
+++ b/src/phbf.c
@@ -688,7 +688,10 @@ static int photorec_bf_frag(disk_t *disk_car, partition_t *partition, const char
int ind_stop=0;
previous_time=current_time;
#ifdef HAVE_NCURSES
- ind_stop=photorec_progressbar(stdscr, testbf, status, file_recovery->location.start, disk_car, partition, *file_nbr, current_time-real_start_time, file_stats);
+ ind_stop=photorec_progressbar(stdscr, testbf, status,
+ file_recovery->location.start, disk_car, partition, *file_nbr,
+ (current_time > real_start_time ? current_time - real_start_time: 0),
+ file_stats);
#endif
if(ind_stop!=0)
{