diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-17 17:45:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-17 17:45:01 +0000 |
commit | 93d1b2e0a43982f37b60f6b15b36bc46e3c79f9b (patch) | |
tree | c42a1ccb9870d098482668697b7b9af4d2744263 /app/controllers/repositories_controller.rb | |
parent | cab300e65045e53afe858f52bfbf5b81488f7ea0 (diff) | |
download | redmine-93d1b2e0a43982f37b60f6b15b36bc46e3c79f9b.tar.gz redmine-93d1b2e0a43982f37b60f6b15b36bc46e3c79f9b.zip |
Add Redmine links for repository files using source: and export: keyworkds (#867).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1267 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/repositories_controller.rb')
-rw-r--r-- | app/controllers/repositories_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index bce5f66a9..349d0a505 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -97,7 +97,8 @@ class RepositoriesController < ApplicationController def entry @content = @repository.scm.cat(@path, @rev) show_error_not_found and return unless @content - if 'raw' == params[:format] + if 'raw' == params[:format] || @content.is_binary_data? + # Force the download if it's a binary file send_data @content, :filename => @path.split('/').last else # Prevent empty lines when displaying a file with Windows style eol |