File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ def unescape
42
42
private
43
43
44
44
def extract_octal ( path , index )
45
- [ path [ index + 1 ..index + 4 ] . to_i ( 8 ) , 4 ]
45
+ [ path [ index + 1 ..index + 3 ] . to_i ( 8 ) , 4 ]
46
46
end
47
47
48
48
def extract_escape ( path , index )
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ def test_unicode_path
21
21
assert_equal ( expected_unescaped_path , Git ::EscapedPath . new ( path ) . unescape )
22
22
end
23
23
24
+ def test_unicode_path2
25
+ path = 'test\320\2411991923'
26
+ expected_unescaped_path = 'testС1991923'
27
+ assert_equal ( expected_unescaped_path , Git ::EscapedPath . new ( path ) . unescape )
28
+ end
29
+
24
30
def test_single_char_escapes
25
31
Git ::EscapedPath ::UNESCAPES . each_pair do |escape_char , expected_char |
26
32
path = "\\ #{ escape_char } "
You can’t perform that action at this time.
0 commit comments