From 80f4c8f6ba7561c023b28aea4e71ec0ff6c64318 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 19 Jul 2019 23:41:18 +0800 Subject: [PATCH] repo content --- app/controllers/games_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 5c432baa0..ec69f3963 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -493,9 +493,11 @@ class GamesController < ApplicationController g = Gitlab.client repo_name = g.project(@myshixun.gpid).path_with_namespace @myshixun.update_column(:repo_name, repo_name) + @content = git_fle_content("#{repo_name}.git", path) || "" + else + @content = git_fle_content(@myshixun.repo_path, path) || "" end - @content = git_fle_content("#{repo_name}.git", path) || "" rescue Exception => e # 思路: 异常首先应该考虑去恢复 if params[:retry].to_i == 1