diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-08-27 22:04:00 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-08-27 22:04:00 +0400 |
commit | cb35a80e49ff3cdf3bd240640fc4d0dbd051922a (patch) | |
tree | 9abbff27ad4bede8184a210657a321cd710a3e9d /app/roles | |
parent | cb6fcb6562de278afbaadaf186f8ab1c7a992c23 (diff) | |
parent | 87d2a763e61241ea8f1919c1b0f87d4a23efa5d6 (diff) |
Merge pull request #993 from veprbl/fix_archiving_prefix
Download button: put files into a directory
Diffstat (limited to 'app/roles')
-rw-r--r-- | app/roles/repository.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/roles/repository.rb b/app/roles/repository.rb index 7f1d6f84549..17f524991db 100644 --- a/app/roles/repository.rb +++ b/app/roles/repository.rb @@ -115,10 +115,13 @@ module Repository storage_path = File.join(Rails.root, "tmp", "repositories", self.code) file_path = File.join(storage_path, file_name) + # Put files into a directory before archiving + prefix = self.code + "/" + # Create file if not exists unless File.exists?(file_path) FileUtils.mkdir_p storage_path - file = self.repo.archive_to_file(ref, nil, file_path) + file = self.repo.archive_to_file(ref, prefix, file_path) end file_path |