Only convert the move path to unicode if on windows
This commit is contained in:
parent
7dd4645a7b
commit
532b409a54
|
@ -886,13 +886,14 @@ 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"""
|
||||||
|
|
||||||
# Attempt to convert utf8 path to unicode
|
if deluge.common.is_windows():
|
||||||
# Note: Inconsistent encoding for 'dest', needs future investigation
|
# Attempt to convert utf8 path to unicode
|
||||||
try:
|
# Note: Inconsistent encoding for 'dest', needs future investigation
|
||||||
dest_u = unicode(dest, "utf-8")
|
try:
|
||||||
except TypeError:
|
dest_u = unicode(dest, "utf-8")
|
||||||
# String is already unicode
|
except TypeError:
|
||||||
dest_u = dest
|
# String is already unicode
|
||||||
|
dest_u = dest
|
||||||
|
|
||||||
if not os.path.exists(dest_u):
|
if not os.path.exists(dest_u):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue