]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/traces_controller.rb
Fix new rubocop warnings
[rails.git] / app / controllers / traces_controller.rb
index 9ebad161396300fde5ade76fc6989d2777cda2ba..43977c3ce09b570d8f3cf6c351b181c16be4c936 100644 (file)
@@ -256,7 +256,7 @@ class TracesController < ApplicationController
     filename = "/tmp/#{rand}"
 
     # ...and save the uploaded file to that location
-    File.open(filename, "wb") { |f| f.write(file.read) }
+    File.binwrite(filename, file.read)
 
     # Create the trace object, falsely marked as already
     # inserted to stop the import daemon trying to load it