From 1c7cd3d7af6bf86bd2c1946168e7de8a95b7f8e8 Mon Sep 17 00:00:00 2001 From: Andrew Stone Date: Thu, 17 Feb 2022 12:55:03 -0800 Subject: Fix cache path expansion --- requests_cache/backends/sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'requests_cache') diff --git a/requests_cache/backends/sqlite.py b/requests_cache/backends/sqlite.py index 29bbf97..b95bad8 100644 --- a/requests_cache/backends/sqlite.py +++ b/requests_cache/backends/sqlite.py @@ -306,7 +306,7 @@ def get_cache_path(db_path: AnyPath, use_cache_dir: bool = False, use_temp: bool db_path = Path(gettempdir()) / db_path # Expand relative and user paths (~), make parent dir(s), and better error if parent is a file - db_path = db_path.absolute().expanduser() + db_path = db_path.expanduser().absolute() try: db_path.parent.mkdir(parents=True, exist_ok=True) except FileExistsError: -- cgit v1.2.1