def pathlist2filename(pathlist):
 fullpath = ''
 for elem in pathlist:
  fullpath = os.path.join(fullpath, elem)
 try:
  return fullpath.decode('utf-8')
 except UnicodeDecodeError:
  charenc = chardet.detect(fullpath)['encoding']
  return fullpath.decode(charenc)

def pathlist2filename ( pathlist ) : fullpath = '' for elem in pathlist : fullpath = os . path . join ( fullpath , elem ) try : return fullpath . decode ( 'utf-8' ) except UnicodeDecodeError : charenc = chardet . detect ( fullpath ) [ 'encoding' ] return fullpath . decode ( charenc )
convert a multi-file torrent file path entry to a filename .