Commits

Etienne Perot  committed db03d32

Final file name goes through sys.getfilesystemencoding() first

  • Participants
  • Parent commits e215c58

Comments (0)

Files changed (1)

File dConverter.py

 from dThread import *
 from dSpawn import *
 from dTubes import *
-import unicodedata
+import os, sys, unicodedata
+
 DV.file_ext = {
 	'avi':u'avi',
 	'flv':u'flv',
 		return tmpfilename
 	def getfinalfilename(self, path, prefix, ext):
 		ext = DamnUnicode(ext)
-		prefix = DamnUnicode(prefix)
+		prefix = DamnUnicode(prefix).encode(sys.getfilesystemencoding(), errors='ignore').decode(sys.getfilesystemencoding())
 		path = DamnUnicode(path)
+		Damnlog('Checking prefix', prefix, '/ Full path:', path + prefix + ext)
 		if not os.path.exists(path + prefix + ext):
 			return prefix
 		c = 2