@@ -123,7 +123,7 class RepositoriesController < ApplicationController | |||||
123 | (show_error_not_found; return) unless @content |
|
123 | (show_error_not_found; return) unless @content | |
124 | if 'raw' == params[:format] || @content.is_binary_data? || (@entry.size && @entry.size > Setting.file_max_size_displayed.to_i.kilobyte) |
|
124 | if 'raw' == params[:format] || @content.is_binary_data? || (@entry.size && @entry.size > Setting.file_max_size_displayed.to_i.kilobyte) | |
125 | # Force the download |
|
125 | # Force the download | |
126 | send_data @content, :filename => @path.split('/').last |
|
126 | send_data @content, :filename => filename_for_content_disposition(@path.split('/').last) | |
127 | else |
|
127 | else | |
128 | # Prevent empty lines when displaying a file with Windows style eol |
|
128 | # Prevent empty lines when displaying a file with Windows style eol | |
129 | @content.gsub!("\r\n", "\n") |
|
129 | @content.gsub!("\r\n", "\n") |
General Comments 0
You need to be logged in to leave comments.
Login now