diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-16 01:09:45 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-16 01:09:45 -0800 |
commit | d6394a00f320cf2cba2b80f8c950e7686ab02bc5 (patch) | |
tree | 6a3968e3f45726524583e59a842cf12f1080e421 | |
parent | c3a5aa159ae5739fd7c226c6db9f567d376c8acd (diff) | |
parent | 20868acc96f953a86d17e47787638981be89389b (diff) | |
download | gitlab-ce-d6394a00f320cf2cba2b80f8c950e7686ab02bc5.tar.gz |
Merge pull request #3002 from nafu/repo_patch
Fix file_name for archive
-rw-r--r-- | app/models/repository.rb | 4 |
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 + "/" |