Fix UTF-8 handling in incremental trace update API
This commit is contained in:
parent
cfc99bbd13
commit
9dfb809c57
|
@ -194,7 +194,7 @@ module Ci
|
||||||
|
|
||||||
def trace_length
|
def trace_length
|
||||||
if raw_trace
|
if raw_trace
|
||||||
raw_trace.length
|
raw_trace.bytesize
|
||||||
else
|
else
|
||||||
0
|
0
|
||||||
end
|
end
|
||||||
|
@ -216,7 +216,7 @@ module Ci
|
||||||
recreate_trace_dir
|
recreate_trace_dir
|
||||||
|
|
||||||
File.truncate(path_to_trace, offset) if File.exist?(path_to_trace)
|
File.truncate(path_to_trace, offset) if File.exist?(path_to_trace)
|
||||||
File.open(path_to_trace, 'a') do |f|
|
File.open(path_to_trace, 'ab') do |f|
|
||||||
f.write(trace_part)
|
f.write(trace_part)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue