Skip to content

Commit

Permalink
use code from #56 to fix issue with utp inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Mar 15, 2024
1 parent 0e566d2 commit e5cd08b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Libraries/PyKotor/src/pykotor/extract/installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def override_list(self) -> list[str]:

def override_resources(
self,
directory: str,
directory: str | None = None,
) -> list[FileResource]:
"""Returns a list of FileResources stored in the specified subdirectory located in the 'override' folder linked to the Installation.
Expand All @@ -707,7 +707,14 @@ def override_resources(
-------
A list of FileResources.
"""
return self._override[directory]
if not self._override or directory and directory not in self._override:
self.load_override()

return (
self._override[directory]
if directory
else [override_resource for ov_subfolder_name in self._override for override_resource in self._override[ov_subfolder_name]]
)

# endregion

Expand Down

0 comments on commit e5cd08b

Please sign in to comment.