Skip to content

Commit 89b4f01

Browse files
committed
fix: create blueapi cache folder on login
1 parent 35286f5 commit 89b4f01

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/blueapi/service/authentication.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def save_cache(self, cache: Cache) -> None:
5252
os.chmod(self._file_path, 0o600)
5353

5454
def load_cache(self) -> Cache:
55+
Path(self._file_path).mkdir(parents=True, exist_ok=True)
56+
os.chmod(self._file_path, 0o600)
5557
with open(self._file_path, "rb") as cache_file:
5658
return TypeAdapter(Cache).validate_json(
5759
base64.b64decode(cache_file.read()).decode("utf-8")

0 commit comments

Comments
 (0)