changeset 474:ca22df9e70bc

Fix a crash when handling non-ascii paths
author Thibaut Girka <thib@sitedethib.com>
date Fri, 27 Sep 2013 18:02:04 +0200
parents 1c891c71cf22
children 2f53be1b2f60
files pytouhou/ui/music.pyx
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/ui/music.pyx
+++ b/pytouhou/ui/music.pyx
@@ -35,7 +35,7 @@ class MusicPlayer(object):
                 self.bgms.append(None)
                 logger.warn(u'Music description ā€œ%sā€ not found.', posname)
                 continue
-            globname = join(resource_loader.game_dir, bgm[1]).replace('.mid', '.*')
+            globname = join(resource_loader.game_dir, bgm[1].encode('ascii')).replace('.mid', '.*')
             filenames = glob(globname)
             for filename in reversed(filenames):
                 try: