diff --git a/app/controllers/quality_analysis_controller.rb b/app/controllers/quality_analysis_controller.rb
index 591cef596..7b0bc5327 100644
--- a/app/controllers/quality_analysis_controller.rb
+++ b/app/controllers/quality_analysis_controller.rb
@@ -26,9 +26,8 @@ class QualityAnalysisController < ApplicationController
unless @client.job.exists?(job_name)
@g = Gitlab.client
branch = params[:branch]
- logger.error("##################################{branch}")
language = params[:language]
- path = params[:path]
+ path = params[:path].nil? ? "./" :params[:path]
qa = QualityAnalysis.where(:project_id => @project.id, :author_login => user_name).first
version = qa.nil? ? 1 : qa.sonar_version + 1
properties = "sonar.projectKey=#{sonar_name}
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index 6bc01c83c..0f179d150 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -1,16 +1,18 @@
<%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
-
ZIP下载
- <%# if is_project_manager?(User.current, @project.id) && QualityAnalysis.where(:project_id => @project.id).first.nil? %>
- <%# if User.current.member_of?(@project) %>
- <% if quality_analysis(User.current.try(:login), @repository.id).nil? %>
- <%= link_to "质量分析", quality_analysis_path(:id => @project.id), :remote => true, :class => "btn_zipdown fr" %>
- <% end %>
- <%# end %>
- <%# else %>
+ <% unless @entries.nil? %>
+
ZIP下载
+ <%# if is_project_manager?(User.current, @project.id) && QualityAnalysis.where(:project_id => @project.id).first.nil? %>
+ <%# if User.current.member_of?(@project) %>
+ <% if quality_analysis(User.current.try(:login), @repository.id).nil? %>
+ <%= link_to "质量分析", quality_analysis_path(:id => @project.id), :remote => true, :class => "btn_zipdown fr" %>
+ <% end %>
+ <%# end %>
+ <%# else %>
<%#= link_to "质量分析", project_quality_analysis_path(:project_id => @project.id, :resource_id => @proje), :class => "btn_zipdown fr" %>
- <%# end %>
+ <%# end %>
+ <% end %>