diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index ecbf603b0..ec69f3963 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -489,7 +489,15 @@ class GamesController < ApplicationController path = path.try(:strip) uid_logger("--rep_content: path is #{path}") begin - @content = git_fle_content(@myshixun.repo_path, path) || "" + if @myshixun.repo_name.nil? + 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 + rescue Exception => e # 思路: 异常首先应该考虑去恢复 if params[:retry].to_i == 1