106 - getProgressForItems return NaN for weightPercent until every item has begun loading
arthur-debert opened this issue · 3 comments
arthur-debert commented
easy fix: localWeightLoaded += (item._bytesLoaded / item._bytesTotal) \* item.weight; >>> if (item._bytesTotal) localWeightLoaded += (item._bytesLoaded / item._bytesTotal) \* item.weight;
Original link: http://code.google.com/p/bulk-loader/issues/detail?id=106
arthur-debert commented
debert - 2009-10-22 00:00:00
Hi Fumanchu.
There is definitely something fishy with this, because I cannot reproduce the problem at
all here.
Can you post the minimal test case (if possible with the online urls for the issue) that
will cause it? I can then take a look and see what's wrong.
Thanks
arthur-debert commented
fumanchu12 - 2009-10-28 00:00:00
sorry wrong scenario: it happens only on 0-byte file loading and i didn't see that
one of my PHP scripts returned nothing
it's still a bad idea to divide by something that can be 0 :)
arthur-debert commented
debert - 2009-10-30 00:00:00
None