summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/repo_restorer.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-05-05 13:19:41 +0200
committerJames Lopez <james@jameslopez.es>2016-05-05 13:19:41 +0200
commit28ba2176dc02563761df00dd48434158685d1daf (patch)
tree92472bab567d8ce5658a97c9fad19f417bfa1a33 /lib/gitlab/import_export/repo_restorer.rb
parent7204018a36e79a4b26b954965387495f50115541 (diff)
downloadgitlab-ce-28ba2176dc02563761df00dd48434158685d1daf.tar.gz
fix issue restoring repo
Diffstat (limited to 'lib/gitlab/import_export/repo_restorer.rb')
-rw-r--r--lib/gitlab/import_export/repo_restorer.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb
index dc45238bf2a..9417393ecd1 100644
--- a/lib/gitlab/import_export/repo_restorer.rb
+++ b/lib/gitlab/import_export/repo_restorer.rb
@@ -3,18 +3,20 @@ module Gitlab
class RepoRestorer
include Gitlab::ImportExport::CommandLineUtil
- def initialize(project:, path_to_bundle: )
+ def initialize(project:, path_to_bundle:)
@project = project
@path_to_bundle = path_to_bundle
end
def restore
- return true unless File.exists?(@path)
+ return true unless File.exists?(@path_to_bundle)
FileUtils.mkdir_p(repos_path)
FileUtils.mkdir_p(path_to_repo)
git_unbundle(git_bin_path: Gitlab.config.git.bin_path, repo_path: path_to_repo, bundle_path: @path_to_bundle)
+ rescue
+ false
end
private