app/models/theme.rb in knitkit-2.1.11 vs app/models/theme.rb in knitkit-2.1.12
- old
+ new
@@ -151,10 +151,10 @@
def export
file_support = ErpTechSvcs::FileSupport::Base.new(:storage => Rails.application.config.erp_tech_svcs.file_storage)
tmp_dir = Theme.make_tmp_dir
(tmp_dir + "#{name}[#{theme_id}].zip").tap do |file_name|
file_name.unlink if file_name.exist?
- Zip::ZipFile.open(file_name, Zip::ZipFile::CREATE) do |zip|
+ Zip::ZipFile.open(file_name.to_s, Zip::ZipFile::CREATE) do |zip|
files.each {|file|
contents = file_support.get_contents(File.join(file_support.root,file.directory,file.name))
relative_path = file.directory.sub("#{url}",'')
path = FileUtils.mkdir_p(File.join(tmp_dir,relative_path))
full_path = File.join(path,file.name)