Skip to content
Snippets Groups Projects
Commit 81c5b059 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent division by zero when computing filetransfer ETA. Fixes #4359

parent 349f8bd2
No related branches found
No related tags found
No related merge requests found
......@@ -449,6 +449,8 @@ _('Connection with peer cannot be established.'))
last = file_props['transfered_size'][-1]
transfered = last[1] - first[1]
tim = last[0] - first[0]
if time == 0:
return 0., 0.
speed = round(float(transfered) / tim)
if speed == 0.:
return 0., 0.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment