Skip to content

Commit

Permalink
Fix crash when folder referenced in gameinfo does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
REDxEYE committed Jan 4, 2023
1 parent abe5298 commit a88584e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/utils/gameinfo_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def all_paths(self) -> List[Path]:
path = f"{self.root.as_posix()}/{path.replace('|gameinfo_path|', '')}"
if path.endswith('*'):
path = path[:-1]
for sub_path in (self.root / path).iterdir():
sub_mod = (self.root / path)
if not sub_mod.exists():
continue
for sub_path in sub_mod.iterdir():
paths.append(sub_path)
else:
paths.append(Path(path))
Expand Down

0 comments on commit a88584e

Please sign in to comment.