Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/merge main to develop #331

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/release_notes/version_0.5_updates.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Version 0.5 Updates
/////////////////////////


Version 0.5.5
===============

Fixes
++++++
- fixed issue when paths starting with ~ used for the ``user-cache-directory`` settings were not correctly expanded


Version 0.5.4
===============

Expand Down
8 changes: 4 additions & 4 deletions earthkit/data/core/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,15 +714,15 @@ class UserCachePolicy(CachePolicy):

def __init__(self):
super().__init__()
path = self._expand_path(self._settings.get("user-cache-directory"))
if not os.path.exists(path):
os.makedirs(path, exist_ok=True)
self._path = self._expand_path(self._settings.get("user-cache-directory"))
if not os.path.exists(self._path):
os.makedirs(self._path, exist_ok=True)

def managed(self):
return True

def directory(self):
return self._settings.get("user-cache-directory")
return self._path

def use_message_position_index_cache(self):
return self._settings.get("use-message-position-index-cache")
Expand Down
Loading