FIX: gunzip the downloaded file

This commit is contained in:
Régis Hanol 2019-05-25 00:02:23 +02:00 committed by GitHub
parent 14c7aa8829
commit 3bc99e5372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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!