#29: fixed: creation of archive
This commit is contained in:
parent
00a630146f
commit
8399bd8a69
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue