mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 00:18:39 +00:00
Fix #1940 : File & folder renaming issue when using Add Torrent dialog in Windows
The file rename in torrentmanager was calling lt.rename_file directly so skipping the sanitize function normally applied when renaming.
This commit is contained in:
parent
93a860f2a1
commit
683e4be529
1 changed files with 4 additions and 3 deletions
|
@ -417,9 +417,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, name in options["mapped_files"].items():
|
for index, filename in options["mapped_files"].items():
|
||||||
log.debug("renaming file index %s to %s", index, name)
|
filename = deluge.core.torrent.sanitize_filepath(filename)
|
||||||
torrent_info.rename_file(index, utf8_encoded(name))
|
log.debug("renaming file index %s to %s", index, filename)
|
||||||
|
torrent_info.rename_file(index, utf8_encoded(filename))
|
||||||
|
|
||||||
add_torrent_params["ti"] = torrent_info
|
add_torrent_params["ti"] = torrent_info
|
||||||
add_torrent_params["resume_data"] = ""
|
add_torrent_params["resume_data"] = ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue