diff --git a/deluge/metafile.py b/deluge/metafile.py index 5b0a718a1..ced93bca9 100644 --- a/deluge/metafile.py +++ b/deluge/metafile.py @@ -175,11 +175,12 @@ def makeinfo(path, piece_length, progress, name = None, piece_count += 1 done = 0 sh = sha() - progress(piece_count, num_pieces) + progress(piece_count, num_pieces) h.close() if done > 0: pieces.append(sh.digest()) - + progress(piece_count, num_pieces) + if name is not None: assert isinstance(name, unicode) name = to_utf8(name)