fix audio playing on win32

This commit is contained in:
Damien Elmes 2011-12-16 08:49:27 +09:00
parent 1986394e56
commit 5129913f25

View file

@ -147,7 +147,7 @@ def queueMplayer(path):
# mplayer on windows doesn't like the encoding, so we create a
# temporary file instead. oddly, foreign characters in the dirname
# don't seem to matter.
dir = tmpdir().encode(sys.getfilesystemencoding())
dir = unicode(tmpdir(), sys.getfilesystemencoding())
name = os.path.join(dir, "audio"+os.path.splitext(path)[1])
f = open(name, "wb")
f.write(open(path, "rb").read())