Skip to content

Commit

Permalink
Merge pull request #192 from urjitbhatia/feat_search_cfg_in_cwd
Browse files Browse the repository at this point in the history
search for config files relative to cwd wherever the script is run from
  • Loading branch information
hjessmith authored Jun 22, 2023
2 parents 695ab11 + 7fd149e commit fa31b2f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions animated_drawings/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def resolve_ad_filepath(file_name: str, file_type: str) -> Path:
"""
if Path(file_name).exists():
return Path(file_name)
elif Path.joinpath(Path.cwd(), file_name).exists():
return Path.joinpath(Path.cwd(), file_name)
elif Path(resource_filename(__name__, file_name)).exists():
return Path(resource_filename(__name__, file_name))
elif Path(resource_filename(__name__, str(Path('..', file_name)))):
Expand Down

0 comments on commit fa31b2f

Please sign in to comment.