Ensure cache directory for CacheStoreDatabase exists.
This commit is contained in:
parent
5f20f76f36
commit
afb75a67b1
@ -39,6 +39,7 @@ class CacheStoreDatabase
|
|||||||
# Closes the underlying database (if it is created and open).
|
# Closes the underlying database (if it is created and open).
|
||||||
def close_if_open!
|
def close_if_open!
|
||||||
return unless @db
|
return unless @db
|
||||||
|
cache_path.dirname.mkpath
|
||||||
cache_path.atomic_write(JSON.dump(@db))
|
cache_path.atomic_write(JSON.dump(@db))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user