Commit 167f5335 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Martyn Russell

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%
parent d4deba67
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment