From 020633503b6e3d5fbf1d7c806a08de9148f2eadb Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Mon, 20 Oct 2014 14:00:58 +0200 Subject: [PATCH] Fix UTF-8 encode on security db file download --- lib/common/db_updater.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/db_updater.rb b/lib/common/db_updater.rb index 32fe0847..897e71b8 100644 --- a/lib/common/db_updater.rb +++ b/lib/common/db_updater.rb @@ -73,7 +73,7 @@ class DbUpdater res = Browser.get(file_url, request_params) fail "Error while downloading #{file_url}" unless res.code == 200 - File.write(file_path, res.body) + File.open(file_path, 'wb') { |f| f.write(res.body) } local_file_checksum(filename) end