cache_dir must be created recursively.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein 2017-04-30 20:27:01 +02:00
parent 7d37684c02
commit 0d085fd829

View file

@ -113,7 +113,7 @@ module Nanoc::Filters
def cache_write (input,output,cache_dir=CACHEDIR) def cache_write (input,output,cache_dir=CACHEDIR)
# create cache_dir, if necessary # create cache_dir, if necessary
Dir.mkdir(cache_dir) if !File.exist?(cache_dir) FileUtils.mkdir_p(cache_dir) if !File.exist?(cache_dir)
# write output to cache file # write output to cache file
cache_file = cache_dir + '/' + cache_filename(input) cache_file = cache_dir + '/' + cache_filename(input)
if File.directory?(cache_dir) if File.directory?(cache_dir)