contrib/deluge/fs31433.patch

30 lines
1.2 KiB
Diff

diff -u -Nr deluge-1.3.5/deluge/core/torrent.py deluge-1.3.5-fs31433/deluge/core/torrent.py
--- deluge-1.3.5/deluge/core/torrent.py 2012-04-10 03:53:16.000000000 +0200
+++ deluge-1.3.5-fs31433/deluge/core/torrent.py 2012-10-24 06:14:05.838480957 +0200
@@ -834,14 +834,17 @@
def move_storage(self, dest):
"""Move a torrent's storage location"""
- # Attempt to convert utf8 path to unicode
- # Note: Inconsistent encoding for 'dest', needs future investigation
- try:
- dest_u = unicode(dest, "utf-8")
- except TypeError:
- # String is already unicode
- dest_u = dest
-
+ if deluge.common.windows_check():
+ # Attempt to convert utf8 path to unicode
+ # Note: Inconsistent encoding for 'dest', needs future investigation
+ try:
+ dest_u = unicode(dest, "utf-8")
+ except TypeError:
+ # String is already unicode
+ dest_u = dest
+ else:
+ dest_u = dest
+
if not os.path.exists(dest_u):
try:
# Try to make the destination path if it doesn't exist