mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-26 04:32:51 +01:00
create missing directories for archive files (#2597)
This commit is contained in:
parent
82c1cc130b
commit
a96f9d29b5
@ -695,7 +695,11 @@ class ExtendedUrl():
|
||||
class DownloadArchive():
|
||||
|
||||
def __init__(self, path, format_string, cache_key="_archive_key"):
|
||||
con = sqlite3.connect(path, timeout=60, check_same_thread=False)
|
||||
try:
|
||||
con = sqlite3.connect(path, timeout=60, check_same_thread=False)
|
||||
except sqlite3.OperationalError:
|
||||
os.makedirs(os.path.dirname(path))
|
||||
con = sqlite3.connect(path, timeout=60, check_same_thread=False)
|
||||
con.isolation_level = None
|
||||
|
||||
self.close = con.close
|
||||
|
Loading…
Reference in New Issue
Block a user