more unicode fixes: os.path functions use unicode depending on the OS

This commit is contained in:
marcelveldt 2016-01-18 12:05:05 +01:00
parent 2bd1d139c1
commit eae4fea76a
7 changed files with 30 additions and 13 deletions

View file

@ -185,7 +185,10 @@ class Artwork():
for dir in allDirs:
allDirs, allFiles = xbmcvfs.listdir(path+dir)
for file in allFiles:
xbmcvfs.delete(os.path.join(path+dir.decode('utf-8'),file.decode('utf-8')))
if os.path.supports_unicode_filenames:
xbmcvfs.delete(os.path.join(path+dir.decode('utf-8'),file.decode('utf-8')))
else:
xbmcvfs.delete(os.path.join(path.encode('utf-8')+dir,file))
# remove all existing data from texture DB
textureconnection = utils.kodiSQL('texture')