From e12862520d637a4cb907d18ab21924488f9156f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 23 Sep 2016 08:23:04 +0200 Subject: [PATCH] expand path for cache database --- gallery_dl/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gallery_dl/cache.py b/gallery_dl/cache.py index 972bf874..951d962f 100644 --- a/gallery_dl/cache.py +++ b/gallery_dl/cache.py @@ -12,7 +12,7 @@ import sqlite3 import pickle import time import tempfile -import os +import os.path import functools from . import config @@ -98,6 +98,7 @@ class DatabaseCache(CacheModule): path = config.get(("cache", "file"), path_default) if path is None: raise RuntimeError() + path = os.path.expanduser(os.path.expandvars(path)) self.db = sqlite3.connect(path, timeout=30, check_same_thread=False) self.db.execute("CREATE TABLE IF NOT EXISTS data (" "key TEXT PRIMARY KEY,"