diff options
-rw-r--r-- | app/controllers/projects/commits_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb index 5f4afd2cdee..026708169f4 100644 --- a/app/controllers/projects/commits_controller.rb +++ b/app/controllers/projects/commits_controller.rb @@ -45,8 +45,7 @@ class Projects::CommitsController < Projects::ApplicationController private def set_commits - render_404 unless request.format == :atom || @repository.blob_at(@commit.id, @path) || @repository.tree(@commit.id, @path).entries.present? - + render_404 unless @path.empty? || request.format == :atom || @repository.blob_at(@commit.id, @path) || @repository.tree(@commit.id, @path).entries.present? @limit, @offset = (params[:limit] || 40).to_i, (params[:offset] || 0).to_i search = params[:search] |