mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-12 03:18:47 +00:00
Don't deliver empty resume_data parameter to session.add_torrent
Fixes a libtorrent crash on python 2.7 on Windows
This commit is contained in:
parent
dcd85e64c0
commit
93dee4c764
1 changed files with 2 additions and 2 deletions
|
@ -376,6 +376,7 @@ class TorrentManager(component.Component):
|
||||||
resume_data = self.legacy_get_resume_data_from_file(state.torrent_id)
|
resume_data = self.legacy_get_resume_data_from_file(state.torrent_id)
|
||||||
self.legacy_delete_resume_data(state.torrent_id)
|
self.legacy_delete_resume_data(state.torrent_id)
|
||||||
|
|
||||||
|
if resume_data:
|
||||||
add_torrent_params["resume_data"] = resume_data
|
add_torrent_params["resume_data"] = resume_data
|
||||||
else:
|
else:
|
||||||
# We have a torrent_info object or magnet uri so we're not loading from state.
|
# We have a torrent_info object or magnet uri so we're not loading from state.
|
||||||
|
@ -431,7 +432,6 @@ class TorrentManager(component.Component):
|
||||||
torrent_info.rename_file(index, fname.encode("utf-8"))
|
torrent_info.rename_file(index, fname.encode("utf-8"))
|
||||||
|
|
||||||
add_torrent_params["ti"] = torrent_info
|
add_torrent_params["ti"] = torrent_info
|
||||||
add_torrent_params["resume_data"] = ""
|
|
||||||
|
|
||||||
#log.info("Adding torrent: %s", filename)
|
#log.info("Adding torrent: %s", filename)
|
||||||
log.debug("options: %s", options)
|
log.debug("options: %s", options)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue