mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-27 03:36:16 +00:00
Only convert the move path to unicode if on windows
This commit is contained in:
parent
725d06f439
commit
fc14b00868
@ -834,13 +834,14 @@ class Torrent(object):
|
||||
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.is_windows():
|
||||
# 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 not os.path.exists(dest_u):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user