mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-10-22 07:21:21 +00:00
build system: fix open file leak
This commit is contained in:
parent
613d6e8f7b
commit
8ae78da74e
@ -467,8 +467,8 @@ PCH status: <%= c?(:USE_PRECOMPILED_HEADERS) ? "enabled" : "disabled" %>
|
||||
|
||||
def self.load_config
|
||||
# puts "load #{@config_file}" if @verbose
|
||||
config = JSON.load(@config_file.open) if @config_file.exist?
|
||||
config = {} unless config
|
||||
config = {}
|
||||
config = @config_file.open { |f| JSON.load(f) } if @config_file.exist?
|
||||
@htrace = config.fetch('htrace', @htrace)
|
||||
@pretty = config.fetch('pretty', @pretty)
|
||||
@db_scan = config.fetch('scan', @db_scan)
|
||||
|
Loading…
Reference in New Issue
Block a user