Commit a1d106110d81eee71afb4563bce2ee88ff27a70e

Authored by Fumiya Nakamura
1 parent f9dd547a

Fix file_name for archive

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/repository.rb
@@ -132,7 +132,7 @@ class Repository @@ -132,7 +132,7 @@ class Repository
132 return nil unless commit 132 return nil unless commit
133 133
134 # Build file path 134 # Build file path
135 - file_name = self.path_with_namespace + "-" + commit.id.to_s + ".tar.gz" 135 + file_name = self.path_with_namespace.gsub("/","_") + "-" + commit.id.to_s + ".tar.gz"
136 storage_path = Rails.root.join("tmp", "repositories") 136 storage_path = Rails.root.join("tmp", "repositories")
137 file_path = File.join(storage_path, file_name) 137 file_path = File.join(storage_path, file_name)
138 138