From 3bc99e537207a97927317c3e019b1f1da886d1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Sat, 25 May 2019 00:02:23 +0200 Subject: [PATCH] FIX: gunzip the downloaded file --- lib/discourse_ip_info.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/discourse_ip_info.rb b/lib/discourse_ip_info.rb index df4f6dd392a..37b0fa2e74d 100644 --- a/lib/discourse_ip_info.rb +++ b/lib/discourse_ip_info.rb @@ -33,9 +33,9 @@ class DiscourseIpInfo tmp_file_name: "#{name}.gz" ) - path = gz_file.path.sub(/\.gz\z/, "") - Discourse::Utils.execute_command("gunzip", path) + Discourse::Utils.execute_command("gunzip", gz_file.path) + path = gz_file.path.sub(/\.gz\z/, "") FileUtils.mv(path, mmdb_path(name)) ensure gz_file&.close!