Ensure cache directory for CacheStoreDatabase exists.

This commit is contained in:
Markus Reiter 2018-10-14 00:29:02 +02:00
parent 5f20f76f36
commit afb75a67b1

View File

@ -39,6 +39,7 @@ class CacheStoreDatabase
# Closes the underlying database (if it is created and open).
def close_if_open!
return unless @db
cache_path.dirname.mkpath
cache_path.atomic_write(JSON.dump(@db))
end