mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +00:00
Fix #1527 - Converting unicode to unicode error in move_storage
This commit is contained in:
parent
e198ea14e4
commit
f8737777b1
@ -808,8 +808,13 @@ class Torrent(object):
|
|||||||
def move_storage(self, dest):
|
def move_storage(self, dest):
|
||||||
"""Move a torrent's storage location"""
|
"""Move a torrent's storage location"""
|
||||||
|
|
||||||
# Convert path from utf8 to unicode
|
# Attempt to convert utf8 path to unicode
|
||||||
dest_u=unicode(dest,"utf-8")
|
# 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 not os.path.exists(dest_u):
|
if not os.path.exists(dest_u):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user