Commit 55121a23 authored by tmaruyama's avatar tmaruyama

fix scm_iconv local variable name (#12228)

git-svn-id: https://svn.redmine.org/redmine/trunk@10741 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 47a4ce65
......@@ -264,7 +264,7 @@ module Redmine
str.force_encoding(from)
begin
s = str.encode(to)
rescue Exception => e
rescue Exception => err
logger.error("failed to convert from #{from} to #{to}. #{err}")
nil
end
......
......@@ -460,6 +460,23 @@ begin
assert_equal Time.gm(2009, 6, 19, 4, 37, 23), readme.lastrev.time
end
def test_entries_wrong_path_encoding
adpt = Redmine::Scm::Adapters::GitAdapter.new(
REPOSITORY_PATH,
nil,
nil,
nil,
'EUC-JP'
)
entries1 = adpt.entries('latin-1-dir', '64f1f3e8')
assert entries1
assert_equal 3, entries1.size
f1 = entries1[1]
assert_equal nil, f1.name
assert_equal nil, f1.path
assert_equal 'file', f1.kind
end
def test_entries_latin_1_files
entries1 = @adapter.entries('latin-1-dir', '64f1f3e8')
assert entries1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment