We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28aa69f commit 21dba61Copy full SHA for 21dba61
lib/git/escaped_path.rb
@@ -42,7 +42,7 @@ def unescape
42
private
43
44
def extract_octal(path, index)
45
- [path[index + 1..index + 4].to_i(8), 4]
+ [path[index + 1..index + 3].to_i(8), 4]
46
end
47
48
def extract_escape(path, index)
tests/units/test_escaped_path.rb
@@ -21,6 +21,12 @@ def test_unicode_path
21
assert_equal(expected_unescaped_path, Git::EscapedPath.new(path).unescape)
22
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
+
30
def test_single_char_escapes
31
Git::EscapedPath::UNESCAPES.each_pair do |escape_char, expected_char|
32
path = "\\#{escape_char}"
0 commit comments