mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-21 08:24:00 +01:00
changed unicode encoding for destination path
This commit is contained in:
@@ -316,13 +316,13 @@ def moveFiles(albumpath, release, tracks):
|
|||||||
if folder.endswith('.'):
|
if folder.endswith('.'):
|
||||||
folder = folder.replace(folder[len(folder)-1], '_')
|
folder = folder.replace(folder[len(folder)-1], '_')
|
||||||
|
|
||||||
destination_path = os.path.normpath(os.path.join(headphones.DESTINATION_DIR, folder))
|
destination_path = os.path.normpath(os.path.join(headphones.DESTINATION_DIR, folder)).encode(headphones.SYS_ENCODING)
|
||||||
|
|
||||||
if os.path.exists(destination_path):
|
if os.path.exists(destination_path):
|
||||||
i = 1
|
i = 1
|
||||||
while True:
|
while True:
|
||||||
newfolder = folder + '[%i]' % i
|
newfolder = folder + '[%i]' % i
|
||||||
destination_path = os.path.normpath(os.path.join(headphones.DESTINATION_DIR, newfolder))
|
destination_path = os.path.normpath(os.path.join(headphones.DESTINATION_DIR, newfolder)).encode(headphones.SYS_ENCODING)
|
||||||
if os.path.exists(destination_path):
|
if os.path.exists(destination_path):
|
||||||
i += 1
|
i += 1
|
||||||
else:
|
else:
|
||||||
@@ -331,8 +331,6 @@ def moveFiles(albumpath, release, tracks):
|
|||||||
|
|
||||||
logger.info('Moving files from %s to %s' % (unicode(albumpath, headphones.SYS_ENCODING, errors="replace"), destination_path))
|
logger.info('Moving files from %s to %s' % (unicode(albumpath, headphones.SYS_ENCODING, errors="replace"), destination_path))
|
||||||
|
|
||||||
destination_path = destination_path.encode(headphones.SYS_ENCODING)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.makedirs(destination_path)
|
os.makedirs(destination_path)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user