lib/rapinoe/slide.rb in rapinoe-0.0.1 vs lib/rapinoe/slide.rb in rapinoe-0.0.2
- old
+ new
@@ -31,9 +31,10 @@
@data
end
# Writes the preview for this slide to disk.
def write_preview_to_file(path)
+ FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'wb') do |out|
out.write(preview_data)
end
end