mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
Prevent setting file priorities if file priority list length does not
equal the number of files.
This commit is contained in:
parent
67d156973c
commit
6a734dab69
1 changed files with 4 additions and 0 deletions
|
@ -185,6 +185,10 @@ class Torrent:
|
|||
|
||||
def set_file_priorities(self, file_priorities):
|
||||
log.debug("setting %s's file priorities: %s", self.torrent_id, file_priorities)
|
||||
if len(file_priorities) != self.torrent_info.num_files():
|
||||
log.debug("file_priorities len != num_files")
|
||||
return
|
||||
|
||||
self.handle.prioritize_files(file_priorities)
|
||||
|
||||
if 0 in self.file_priorities:
|
||||
|
|
Loading…
Add table
Reference in a new issue