summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-16 01:09:45 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-16 01:09:45 -0800
commitd6394a00f320cf2cba2b80f8c950e7686ab02bc5 (patch)
tree6a3968e3f45726524583e59a842cf12f1080e421
parentc3a5aa159ae5739fd7c226c6db9f567d376c8acd (diff)
parent20868acc96f953a86d17e47787638981be89389b (diff)
downloadgitlab-ce-d6394a00f320cf2cba2b80f8c950e7686ab02bc5.tar.gz
Merge pull request #3002 from nafu/repo_patch
Fix file_name for archive
-rw-r--r--app/models/repository.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 8bcafbacda1..a5ca5533e08 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -132,9 +132,9 @@ class Repository
return nil unless commit
# Build file path
- file_name = self.path_with_namespace + "-" + commit.id.to_s + ".tar.gz"
+ file_name = self.path_with_namespace.gsub("/","_") + "-" + commit.id.to_s + ".tar.gz"
storage_path = Rails.root.join("tmp", "repositories")
- file_path = File.join(storage_path, file_name)
+ file_path = File.join(storage_path, self.path_with_namespace, file_name)
# Put files into a directory before archiving
prefix = self.path_with_namespace + "/"