Skip to content

Commit

Permalink
fix a inheritence check
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Feb 19, 2024
1 parent af3be71 commit abd5b49
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 @@ -73,7 +73,7 @@ def parse_arg(arg: Any) -> CaseAwarePath | Any:
return CaseAwarePath
if arg.__class__ is CaseAwarePath:
return arg if pathlib.Path(arg).exists() else CaseAwarePath.get_case_sensitive_path(arg)
if not hasattr(arg, "__bases__") and arg.__class__ in InternalPurePath.__bases__ and pathlib.Path.exists(arg):
if not hasattr(arg, "__bases__") and arg.__class__ in CaseAwarePath.__base__.__bases__ and pathlib.Path.exists(arg):
return CaseAwarePath.get_case_sensitive_path(arg)
return arg

Expand Down

0 comments on commit abd5b49

Please sign in to comment.