Author: andar
Revision: 5697
Log:
Fix num_pieces calculation
Diff:
Modified: trunk/deluge/maketorrent.py
===================================================================
--- trunk/deluge/maketorrent.py 2009-08-20 01:23:04 UTC (rev 5696)
+++ trunk/deluge/maketorrent.py 2009-08-20 22:27:40 UTC (rev 5697)
@@ -133,6 +133,9 @@
# Calculate the number of pieces we will require for the data
num_pieces = datasize / piece_size
+ if datasize % piece_size:
+ num_pieces += 1
+
torrent["info"]["piece length"] = piece_size
# Create the info
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---