Skip to content

Commit

Permalink
Update path.py
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Feb 19, 2024
1 parent c67fcc7 commit 027e007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/PyKotor/src/pykotor/tools/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def create_case_insensitive_pathlib_class(cls: type): # TODO: move into CaseAwa
class CaseAwarePath(InternalWindowsPath if os.name == "nt" else InternalPosixPath): # type: ignore[misc]
"""A class capable of resolving case-sensitivity in a path. Absolutely essential for working with KOTOR files on Unix filesystems."""
def resolve(self, strict=False): # noqa: FBT002
if not pathlib.Path.exists(self):
if not pathlib.Path(self).exists():
new_path = self.get_case_sensitive_path(self)
return super(CaseAwarePath, new_path).resolve(strict)
return super().resolve(strict)
Expand Down

0 comments on commit 027e007

Please sign in to comment.