mirror of
https://github.com/redmine/redmine.git
synced 2025-11-04 20:35:57 +01:00
Fixed: Links to repository directories don't work (#1119).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1365 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -65,7 +65,8 @@ class RepositoriesController < ApplicationController
|
||||
if request.xhr?
|
||||
@entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
|
||||
else
|
||||
show_error_not_found unless @entries
|
||||
show_error_not_found and return unless @entries
|
||||
render :action => 'browse'
|
||||
end
|
||||
rescue Redmine::Scm::Adapters::CommandFailed => e
|
||||
show_error_command_failed(e.message)
|
||||
@@ -95,6 +96,12 @@ class RepositoriesController < ApplicationController
|
||||
end
|
||||
|
||||
def entry
|
||||
@entry = @repository.scm.entry(@path, @rev)
|
||||
show_error_not_found and return unless @entry
|
||||
|
||||
# If the entry is a dir, show the browser
|
||||
browse and return if @entry.is_dir?
|
||||
|
||||
@content = @repository.scm.cat(@path, @rev)
|
||||
show_error_not_found and return unless @content
|
||||
if 'raw' == params[:format] || @content.is_binary_data?
|
||||
|
||||
Reference in New Issue
Block a user