Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-06-08 20:39:33 +0300
committerTomasz Maczukin <tomasz@maczukin.pl>2016-06-10 14:09:34 +0300
commit9dfb809c578735d807070d77ad567ab5c3de9b6c (patch)
tree71c53f315f3c13f0f3179e0fc680ef891de214df /app
parentcfc99bbd1390bc548a703fdc7857c7db5b0e7c13 (diff)
Fix UTF-8 handling in incremental trace update API
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index b8ada6361ac..6a64ca451f7 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -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