Commit f97ae2ff854fe74f2fa350ad2f179443fffa66b4

Authored by Martin Bastien
1 parent 9152ab79

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)
... ...