Commit 32dadb46fa6ee08486d54d712bd06421ede93b0d
Exists in
master
and in
4 other branches
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,12 +151,12 @@ class Repository | ||
151 | return nil unless commit | 151 | return nil unless commit |
152 | 152 | ||
153 | # Build file path | 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 | file_path = File.join(storage_path, file_name) | 156 | file_path = File.join(storage_path, file_name) |
157 | 157 | ||
158 | # Put files into a directory before archiving | 158 | # Put files into a directory before archiving |
159 | - prefix = self.path + "/" | 159 | + prefix = self.path_with_namespace + "/" |
160 | 160 | ||
161 | # Create file if not exists | 161 | # Create file if not exists |
162 | unless File.exists?(file_path) | 162 | unless File.exists?(file_path) |