Mercurial > touhou
diff pytouhou/resource/loader.py @ 297:a09ac4650e0d
Fix relative path handling and os-specific path separators.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 06 Mar 2012 17:45:14 +0100 |
parents | 2100276c289d |
children | 92a6fd2632f1 |
line wrap: on
line diff
--- a/pytouhou/resource/loader.py +++ b/pytouhou/resource/loader.py @@ -106,7 +106,7 @@ class Loader(object): def scan_archives(self, paths_lists): for paths in paths_lists: def _expand_paths(): - for path in paths.split(':'): + for path in paths.split(os.path.pathsep): if self.game_dir and not os.path.isabs(path): path = os.path.join(self.game_dir, path) yield glob(path) @@ -170,8 +170,6 @@ class Loader(object): def get_eosd_characters(self): #TODO: Move to pytouhou.games.eosd? path = self.exe - if self.game_dir and not os.path.isabs(path): - path = os.path.join(self.game_dir, path) with open(path, 'rb') as file: characters = EoSDSHT.read(file) #TODO: modular return characters