summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-09-01 22:17:05 +0200
committerTomasz Maczukin <tomasz@maczukin.pl>2016-09-01 22:17:05 +0200
commit52fe6098861bf36601be6555d2b39f366795ddd3 (patch)
tree9df834d218b11341c6bc76752ef93690bb8039da
parent7a3cdd4aa0b989fde9024ac52aa513cbbc1ae42d (diff)
downloadgitlab-ce-fix/handle-raw-trace-error-on-old-builds.tar.gz
Refactor Ci::Build#raw_tracefix/handle-raw-trace-error-on-old-builds
-rw-r--r--app/models/ci/build.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index f219cee4a62..61052437318 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -217,11 +217,8 @@ module Ci
end
def raw_trace
- if File.exist?(path_to_trace)
- File.read(path_to_trace)
- elsif has_old_trace_file?
- # Temporary fix for build trace data integrity
- File.read(old_path_to_trace)
+ if File.exist?(trace_file_path)
+ File.read(trace_file_path)
else
# backward compatibility
read_attribute :trace