Skip to content

Commit

Permalink
Use Path.home() to support windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrik Borg committed Oct 18, 2024
1 parent b2b16c3 commit ee87743
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions caep/xdg.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def get_xdg_dir(xdg_id: str, env_name: str, default: str, create: bool = False)
Return path to cache_directory
"""

home = os.environ["HOME"]
home = Path.home()

xdg_home = os.environ.get(env_name, Path(home) / default)
xdg_home = os.environ.get(env_name, home / default)
xdg_dir = Path(xdg_home) / xdg_id

if create and not xdg_dir.is_dir():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="caep",
version="1.1.0",
version="1.2.0",
author="mnemonic AS",
zip_safe=True,
author_email="[email protected]",
Expand Down

0 comments on commit ee87743

Please sign in to comment.