Skip to content
Snippets Groups Projects
Commit a9783c43 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Make encoding of paths returned by metadata consistent (UTF-8)

parent 0b946029
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -20,7 +20,7 @@ module Gitlab
end
 
def errors
gzip do|gz|
gzip do |gz|
read_string(gz) # version
errors = read_string(gz)
raise StandardError, 'Errors field not found!' unless errors
Loading
Loading
@@ -36,7 +36,7 @@ module Gitlab
end
 
def to_path
Path.new(@path, *match!)
Path.new(@path.dup.force_encoding('UTF-8'), *match!)
end
 
private
Loading
Loading
@@ -88,7 +88,7 @@ module Gitlab
 
def read_string(gz)
string_size = read_uint32(gz)
return false unless string_size
return nil unless string_size
gz.read(string_size)
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment