Mercurial > touhou
diff pytouhou/ui/music.pyx @ 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 | 6864a38b2413 |
children | 4778c482f24a |
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: