@@ -113,15 +113,15 module Redmine | |||||
113 | cmd_args << "#{identifier}:#{p}" if identifier |
|
113 | cmd_args << "#{identifier}:#{p}" if identifier | |
114 | scm_cmd(*cmd_args) do |io| |
|
114 | scm_cmd(*cmd_args) do |io| | |
115 | io.each_line do |line| |
|
115 | io.each_line do |line| | |
116 | if line.respond_to?(:force_encoding) |
|
|||
117 | line.force_encoding('ASCII-8BIT') |
|
|||
118 | end |
|
|||
119 | e = line.chomp.to_s |
|
116 | e = line.chomp.to_s | |
120 | if e =~ /^\d+\s+(\w+)\s+([0-9a-f]{40})\s+([0-9-]+)\t(.+)$/ |
|
117 | if e =~ /^\d+\s+(\w+)\s+([0-9a-f]{40})\s+([0-9-]+)\t(.+)$/ | |
121 | type = $1 |
|
118 | type = $1 | |
122 | sha = $2 |
|
119 | sha = $2 | |
123 | size = $3 |
|
120 | size = $3 | |
124 | name = $4 |
|
121 | name = $4 | |
|
122 | if name.respond_to?(:force_encoding) | |||
|
123 | name.force_encoding(@path_encoding) | |||
|
124 | end | |||
125 | full_path = p.empty? ? name : "#{p}/#{name}" |
|
125 | full_path = p.empty? ? name : "#{p}/#{name}" | |
126 | n = scm_iconv('UTF-8', @path_encoding, name) |
|
126 | n = scm_iconv('UTF-8', @path_encoding, name) | |
127 | full_p = scm_iconv('UTF-8', @path_encoding, full_path) |
|
127 | full_p = scm_iconv('UTF-8', @path_encoding, full_path) |
General Comments 0
You need to be logged in to leave comments.
Login now