[tracker/tracker-0.10] libtracker-miner: When reporting progress, ensure items processed <= total items
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] libtracker-miner: When reporting progress, ensure items processed <= total items
- Date: Wed, 2 Mar 2011 14:46:07 +0000 (UTC)
commit cdff8e09feacebb14d5896aa07cacd0c8d15d5ce
Author: Aleksander Morgado <aleksander lanedo com>
Date: Wed Feb 23 18:00:11 2011 +0100
libtracker-miner: When reporting progress, ensure items processed <= total items
Fixes GB#642581
src/libtracker-miner/tracker-miner-fs.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index aca9f7b..6fd9e8d 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2608,7 +2608,8 @@ item_queue_get_progress (TrackerMinerFS *fs,
items_total += fs->private->total_files_found;
if (n_items_processed) {
- *n_items_processed = items_total - items_to_process;
+ *n_items_processed = ((items_total >= items_to_process) ?
+ (items_total - items_to_process) : 0);
}
if (n_items_remaining) {
@@ -2735,7 +2736,7 @@ item_queue_handlers_cb (gpointer user_data)
items_remaining);
str2 = tracker_seconds_to_string (seconds_elapsed, TRUE);
- tracker_info ("Processed %d/%d, estimated %s left, %s elapsed",
+ tracker_info ("Processed %u/%u, estimated %s left, %s elapsed",
items_processed,
items_processed + items_remaining,
str1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]