Commit 24a7c0f63d892483c02ff98374f4fb2e03fc0654

Authored by Fumiya Nakamura
1 parent e5080755

Fix file_name for archive

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/repository.rb
@@ -151,7 +151,7 @@ class Repository @@ -151,7 +151,7 @@ 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_with_namespace + "-" + commit.id.to_s + ".tar.gz" 154 + file_name = self.path_with_namespace.gsub("/","_") + "-" + commit.id.to_s + ".tar.gz"
155 storage_path = Rails.root.join("tmp", "repositories") 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