Use binary mode for trace files

We don't want to try and do any enoding conversions (or indeed any
newline conversions) on uploaded trace files.
This commit is contained in:
Tom Hughes 2012-11-04 14:35:34 +00:00
parent 6b86b716d1
commit cb6eb65466

View file

@ -368,7 +368,7 @@ private
filename = "/tmp/#{rand}"
# ...and save the uploaded file to that location
File.open(filename, "w") { |f| f.write(file.read) }
File.open(filename, "wb") { |f| f.write(file.read) }
# Create the trace object, falsely marked as already
# inserted to stop the import daemon trying to load it