Check location before using them

This commit is contained in:
g0tmi1k
2018-05-11 11:21:14 +01:00
parent 0cd680bb29
commit 05d27c64be
2 changed files with 11 additions and 2 deletions

View File

@@ -26,6 +26,10 @@ class CacheFileStore
unless Dir.exist?(@storage_path)
FileUtils.mkdir_p(@storage_path)
end
unless Pathname.new(@storage_path).writable?
fail "#{@storage_path} is not writable"
end
end
def clean