mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Don't clobber filename when adding torrents with mapped_files
This commit is contained in:
parent
d3f6616d5d
commit
6f98e1fddb
1 changed files with 4 additions and 4 deletions
|
@ -451,10 +451,10 @@ class TorrentManager(component.Component):
|
||||||
# Check for renamed files and if so, rename them in the torrent_info
|
# Check for renamed files and if so, rename them in the torrent_info
|
||||||
# before adding to the session.
|
# before adding to the session.
|
||||||
if options["mapped_files"]:
|
if options["mapped_files"]:
|
||||||
for index, filename in options["mapped_files"].items():
|
for index, fname in options["mapped_files"].items():
|
||||||
filename = deluge.core.torrent.sanitize_filepath(filename)
|
fname = deluge.core.torrent.sanitize_filepath(fname)
|
||||||
log.debug("renaming file index %s to %s", index, filename)
|
log.debug("renaming file index %s to %s", index, fname)
|
||||||
torrent_info.rename_file(index, utf8_encoded(filename))
|
torrent_info.rename_file(index, utf8_encoded(fname))
|
||||||
|
|
||||||
add_torrent_params["ti"] = torrent_info
|
add_torrent_params["ti"] = torrent_info
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue