Fix UTF-8 handling in incremental trace update API

This commit is contained in:
Tomasz Maczukin 2016-06-08 19:39:33 +02:00
parent cfc99bbd13
commit 9dfb809c57
No known key found for this signature in database
GPG Key ID: 7E9EB2E4B0F625CD
1 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ module Ci
def trace_length
if raw_trace
raw_trace.length
raw_trace.bytesize
else
0
end
@ -216,7 +216,7 @@ module Ci
recreate_trace_dir
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)
end
end