Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug file size 0 #258

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ibridgesgui/popup_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ def _finish_upload(self):

def _upload_status(self, state):
up_size, transferred_size, obj_count, num_objs, obj_failed = state
self.progress_bar.setValue(int(transferred_size*100/up_size))
if up_size > 0:
self.progress_bar.setValue(int(transferred_size*100/up_size))
text = f"{obj_count} of {num_objs} files; failed: {obj_failed}."
self.error_label.setText(text)

Expand Down Expand Up @@ -559,7 +560,8 @@ def _finish_download(self):

def _download_status(self, state):
down_size, transferred_size, obj_count, num_objs, obj_failed = state
self.progress_bar.setValue(int(transferred_size*100/down_size))
if down_size > 0:
self.progress_bar.setValue(int(transferred_size*100/down_size))
text = f"{obj_count} of {num_objs} files; failed: {obj_failed}."
self.error_label.setText(text)

Expand Down
3 changes: 2 additions & 1 deletion ibridgesgui/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def _sync_data_end(self, thread_output: dict):

def _sync_data_status(self, state):
up_size, transferred_size, obj_count, num_objs, obj_failed = state
self.progress_bar.setValue(int(transferred_size*100/up_size))
if up_size > 0:
self.progress_bar.setValue(int(transferred_size*100/up_size))
text = f"{obj_count} of {num_objs} files; failed: {obj_failed}."
self.error_label.setText(text)

Expand Down
Loading