end
def tree_full_path(content)
- if params[:path]
+ content.name.force_encoding('utf-8')
+ if params[:path]
File.join(params[:path], content.name)
else
content.name
def initialize(raw_tree, project, ref = nil, path = nil)
@project, @ref, @path = project, ref, path,
@tree = if path
- raw_tree / path
+ raw_tree / path.dup.force_encoding('ascii-8bit')
else
raw_tree
end
.file_title
%i.icon-file
%span.file_name
- = name
+ = name.force_encoding('utf-8')
%small #{file.mode}
%span.options
= link_to "raw", blob_project_ref_path(@project, @ref, path: params[:path]), class: "btn very_small", target: "_blank"