summaryrefslogtreecommitdiff
path: root/requests_cache/backends/sqlite.py
diff options
context:
space:
mode:
authorAndrew Stone <a@stne.dev>2022-02-17 12:55:03 -0800
committerAndrew Stone <a@stne.dev>2022-02-17 13:13:12 -0800
commit1c7cd3d7af6bf86bd2c1946168e7de8a95b7f8e8 (patch)
tree35e875984ea4a7c390b71c6e224649878721f984 /requests_cache/backends/sqlite.py
parenta03cef8cd23ad793aaf99c0957b85a4cd5f8ba5b (diff)
downloadrequests-cache-1c7cd3d7af6bf86bd2c1946168e7de8a95b7f8e8.tar.gz
Fix cache path expansion
Diffstat (limited to 'requests_cache/backends/sqlite.py')
-rw-r--r--requests_cache/backends/sqlite.py2
1 files changed, 1 insertions, 1 deletions
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: