Skip to content

Commit

Permalink
Fixed NaN during upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas committed Jul 27, 2016
1 parent 0a54556 commit 6b9ce68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pydio/job/continous_merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ def update_sequences_file(self, local_seq, remote_seq):
def handle_transfer_callback_event(self, sender, change):
self.processing_signals[change['target']] = change
self.global_progress["queue_bytesize"] -= change['bytes_sent']
# The following 3 lines are a dirty fix, only working for one file at a time size relaining... Better than NaN
if self.global_progress["queue_bytesize"] < 0:
self.global_progress["queue_bytesize"] = abs(self.global_progress["queue_bytesize"])
self.global_progress["queue_bytesize"] = max(change['total_size'] - change['total_bytes_sent'], self.global_progress["queue_bytesize"])
self.global_progress["queue_done"] += float(change['bytes_sent']) / float(change["total_size"])

@pydio_profile
Expand Down

0 comments on commit 6b9ce68

Please sign in to comment.