]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/traces_controller.rb
Fix new rubocop warnings
[rails.git] / app / controllers / api / traces_controller.rb
index 43bbeeb1d208361e6e236fb6cbab9e1486b89eb1..9894441ff53d525703f13a8a39bb4e302a0b81e2 100644 (file)
@@ -101,7 +101,7 @@ module Api
       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