Fix #1498: Use os.path.normpath on new_folder to remove any double slashes or other problems that could be in the string

This commit is contained in:
Andrew Resch 2011-01-27 11:11:28 -08:00
parent b30499c6ac
commit ac18ecd1f0
1 changed files with 2 additions and 2 deletions

View File

@ -903,8 +903,8 @@ class Torrent(object):
log.error("Attempting to rename a folder with an invalid folder name: %s", new_folder)
return
if new_folder[-1:] != "/":
new_folder += "/"
# Make sure the new folder path is nice and has a trailing slash
new_folder = os.path.norm(new_folder) + "/"
wait_on_folder = (folder, new_folder, [])
for f in self.get_files():