Skip to content

Commit

Permalink
fix: error in default path;
Browse files Browse the repository at this point in the history
  • Loading branch information
WenjieDu committed Jan 15, 2024
1 parent 15f1274 commit bf23dd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tsdb/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
config.read(tsdb_config_path)

data_home_path = os.path.abspath(config.get("path", "data_home"))
old_cached_dataset_dir = os.path.abspath("~/.tsdb_cached_datasets")
old_cached_dataset_dir = os.path.join(os.path.expanduser("~"), ".tsdb_cached_datasets")

if os.path.exists(old_cached_dataset_dir):
# use the old path and warn the user
Expand All @@ -31,7 +31,7 @@
CACHED_DATASET_DIR = data_home_path
else:
# use the default path
default_path = os.path.abspath("~/.tsdb")
default_path = os.path.join(os.path.expanduser("~"), ".tsdb")
CACHED_DATASET_DIR = default_path
logger.warning(
f"‼️ The preset data_home path '{data_home_path}' doesn't exist. "
Expand Down

0 comments on commit bf23dd5

Please sign in to comment.