From 08d7b9fba384f8df21627a6bbe96d491daf03ba4 Mon Sep 17 00:00:00 2001 From: Chase Sterling Date: Sun, 20 Jan 2013 16:26:55 -0500 Subject: [PATCH] Fix issue with downloaded torrent temp files on windows which had illegal characters. --- ChangeLog | 1 + deluge/ui/gtkui/addtorrentdialog.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 39111744a..4966bc2b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -60,6 +60,7 @@ * Fix the Open Folder option not working with non-ascii paths * Fix the daemon starting with config dir containing spaces * Fix Windows tray submenu items requiring right-click instead of left-click + * Fix issue with adding some torrents with illegal characters via url in gtk client ==== OS X ==== * Fix Open File/Folder option diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py index c90c322f6..3d16af1e3 100644 --- a/deluge/ui/gtkui/addtorrentdialog.py +++ b/deluge/ui/gtkui/addtorrentdialog.py @@ -675,8 +675,7 @@ class AddTorrentDialog(component.Component): # Create a tmp file path import tempfile - import os.path - tmp_file = os.path.join(tempfile.gettempdir(), url.split("/")[-1]) + (tmp_handle, tmp_file) = tempfile.mkstemp() def on_part(data, current_length, total_length): if total_length: