Skip to content

Commit

Permalink
fix: normalise the base path before opening the vault, to ensure no p…
Browse files Browse the repository at this point in the history
…arent directory problems.
  • Loading branch information
callumtilbury committed Jul 22, 2024
1 parent 1c31b52 commit d6c13c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flashbax/vault/vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def __init__( # noqa: CCR001
"""
# Get the base path for the vault and the metadata path
vault_str = vault_uid if vault_uid else datetime.now().strftime("%Y%m%d%H%M%S")
self._base_path = os.path.join(os.getcwd(), rel_dir, vault_name, vault_str)
base_path_unnorm = os.path.join(os.getcwd(), rel_dir, vault_name, vault_str)
self._base_path = os.path.normpath(base_path_unnorm)
metadata_path = epath.Path(os.path.join(self._base_path, METADATA_FILE))

# Check if the vault exists, otherwise create the necessary dirs and files
Expand Down

0 comments on commit d6c13c6

Please sign in to comment.