Commit 32dadb46fa6ee08486d54d712bd06421ede93b0d

Authored by Dmitriy Zaporozhets
2 parents 9152ab79 f97ae2ff

Merge pull request #2555 from studiofrenetic/master

Fix for archive download (method path missing)
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
app/models/repository.rb
... ... @@ -151,12 +151,12 @@ class Repository
151 151 return nil unless commit
152 152  
153 153 # Build file path
154   - file_name = self.path + "-" + commit.id.to_s + ".tar.gz"
155   - storage_path = Rails.root.join("tmp", "repositories", self.path_with_namespace)
  154 + file_name = self.path_with_namespace + "-" + commit.id.to_s + ".tar.gz"
  155 + storage_path = Rails.root.join("tmp", "repositories")
156 156 file_path = File.join(storage_path, file_name)
157 157  
158 158 # Put files into a directory before archiving
159   - prefix = self.path + "/"
  159 + prefix = self.path_with_namespace + "/"
160 160  
161 161 # Create file if not exists
162 162 unless File.exists?(file_path)
... ...