Commit 87d2a763e61241ea8f1919c1b0f87d4a23efa5d6

Authored by Dmitry Kalinkin
1 parent 4c1f435a

fix archiving prefix

Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
app/roles/repository.rb
... ... @@ -133,10 +133,13 @@ module Repository
133 133 storage_path = File.join(Rails.root, "tmp", "repositories", self.code)
134 134 file_path = File.join(storage_path, file_name)
135 135  
  136 + # Put files into a directory before archiving
  137 + prefix = self.code + "/"
  138 +
136 139 # Create file if not exists
137 140 unless File.exists?(file_path)
138 141 FileUtils.mkdir_p storage_path
139   - file = self.repo.archive_to_file(ref, nil, file_path)
  142 + file = self.repo.archive_to_file(ref, prefix, file_path)
140 143 end
141 144  
142 145 file_path
... ...