Skip to content

Commit

Permalink
tqdm will not accept 0 bytes files ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedie committed Feb 4, 2016
1 parent 0ff950b commit a436fb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PyHardLinkBackup/phlb/phlb_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ def fast_deduplication_backup(self, old_backup_entry, process_bar):
hash_file.write(hash_hexdigest)

file_size = self.dir_path.stat.st_size
process_bar.update(file_size)
if file_size>0:
# tqdm will not accept 0 bytes files ;)
process_bar.update(file_size)

BackupEntry.objects.create(
backup_run = self.backup_run,
Expand Down

0 comments on commit a436fb9

Please sign in to comment.