diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index fa45a1dea..ad7acc986 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -337,7 +337,7 @@ class RepositoriesController < ApplicationController # TODO 获取最新commit信息 def project_commits if params[:filepath].present? - file_path_uri = URI.parse(URI.encode(params[:filepath].to_s.strip)) + file_path_uri = URI.parse(URI.encode(params[:filepath].to_s)) Gitea::Repository::Commits::FileListService.new(@project.owner.login, @project.identifier, file_path_uri, sha: get_ref, page: 1, limit: 1, token: @project&.owner&.gitea_token).call else