[tracker/miner-fs-refactor: 120/127] libtracker-miner: Fix possibly wrong progress reporting
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 120/127] libtracker-miner: Fix possibly wrong progress reporting
- Date: Mon, 5 Dec 2011 13:29:41 +0000 (UTC)
commit 611fe681a77850c149e8b236d0bdbc8729aef060
Author: Carlos Garnacho <carlos lanedo com>
Date: Mon Nov 28 14:15:00 2011 +0100
libtracker-miner: Fix possibly wrong progress reporting
There's a slim window between the miner calling ::process-file
on the last remaining file and process_stop() where the progress
would be wrongly reported as 0%
src/libtracker-miner/tracker-miner-fs.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 057219d..aea4ad5 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1975,11 +1975,9 @@ item_queue_get_progress (TrackerMinerFS *fs,
*n_items_remaining = items_to_process;
}
- if (items_to_process == 0 && items_total > 0) {
- return 0.0;
- }
-
- if (items_total == 0 || items_to_process > items_total) {
+ if (items_total == 0 ||
+ items_to_process == 0 ||
+ items_to_process > items_total) {
return 1.0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]