Don't show fraction if contentLength is undefined.

This commit is contained in:
Sergey Evdokimov
2011-05-31 16:28:22 +04:00
parent 2484d68569
commit d1f642b68b
@@ -512,7 +512,9 @@ public class FetchExtResourceAction extends BaseExtResourceAction implements Wat
out.write(buffer, 0, read);
bytesRead += read;
indicator.setFraction((double)bytesRead / (double)contentLength);
if (contentLength > 0) {
indicator.setFraction((double)bytesRead / (double)contentLength);
}
}
in.close();