]> source.dussan.org Git - redmine.git/commitdiff
Merged r4816 from trunk.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 12 Feb 2011 09:51:43 +0000 (09:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 12 Feb 2011 09:51:43 +0000 (09:51 +0000)
scm: fix non ASCII filename downloaded from repo is broken on Internet Explorer.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4819 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/repositories_controller.rb

index 8bd323646a89f9f9f0de6b92205a41585484a77e..095e82092eee3f93c736988d2eadc0bdc95706bb 100644 (file)
@@ -123,7 +123,7 @@ class RepositoriesController < ApplicationController
     (show_error_not_found; return) unless @content
     if 'raw' == params[:format] || @content.is_binary_data? || (@entry.size && @entry.size > Setting.file_max_size_displayed.to_i.kilobyte)
       # Force the download
-      send_data @content, :filename => @path.split('/').last
+      send_data @content, :filename => filename_for_content_disposition(@path.split('/').last)
     else
       # Prevent empty lines when displaying a file with Windows style eol
       @content.gsub!("\r\n", "\n")