From 87d2a763e61241ea8f1919c1b0f87d4a23efa5d6 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 27 Jun 2012 21:21:44 +0400 Subject: [PATCH] fix archiving prefix --- app/roles/repository.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/roles/repository.rb b/app/roles/repository.rb index f61c77827e3..8de92965c97 100644 --- a/app/roles/repository.rb +++ b/app/roles/repository.rb @@ -133,10 +133,13 @@ module Repository storage_path = File.join(Rails.root, "tmp", "repositories", self.code) file_path = File.join(storage_path, file_name) + # Put files into a directory before archiving + prefix = self.code + "/" + # Create file if not exists unless File.exists?(file_path) FileUtils.mkdir_p storage_path - file = self.repo.archive_to_file(ref, nil, file_path) + file = self.repo.archive_to_file(ref, prefix, file_path) end file_path