#29: fixed: creation of archive

This commit is contained in:
Vokhmin Alexey V 2014-01-17 21:27:44 +04:00
parent 00a630146f
commit 8399bd8a69
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ class Project < ActiveRecord::Base
def create_archive(treeish, format)
file_name = "#{name}-#{treeish}"
fullname = "#{file_name}.#{tag_file_format(format)}"
file = Tempfile.new fullname, 'tmp'
file = Tempfile.new fullname, File.join(Rails.root, 'tmp')
system("cd #{path}; git archive --format=#{format == 'zip' ? 'zip' : 'tar'} --prefix=#{file_name}/ #{treeish} #{format == 'zip' ? '' : ' | gzip -9'} > #{file.path}")
file.close
{