mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:06:26 +08:00
FIX: gunzip the downloaded file
This commit is contained in:
parent
14c7aa8829
commit
3bc99e5372
|
@ -33,9 +33,9 @@ class DiscourseIpInfo
|
||||||
tmp_file_name: "#{name}.gz"
|
tmp_file_name: "#{name}.gz"
|
||||||
)
|
)
|
||||||
|
|
||||||
path = gz_file.path.sub(/\.gz\z/, "")
|
Discourse::Utils.execute_command("gunzip", gz_file.path)
|
||||||
Discourse::Utils.execute_command("gunzip", path)
|
|
||||||
|
|
||||||
|
path = gz_file.path.sub(/\.gz\z/, "")
|
||||||
FileUtils.mv(path, mmdb_path(name))
|
FileUtils.mv(path, mmdb_path(name))
|
||||||
ensure
|
ensure
|
||||||
gz_file&.close!
|
gz_file&.close!
|
||||||
|
|
Loading…
Reference in New Issue
Block a user