1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-02-20 01:50:04 +00:00

fix write config

This commit is contained in:
nishiki 2016-05-12 22:42:20 +02:00
parent b85d5109a1
commit 9b853a371a

View file

@ -101,12 +101,12 @@ class MPW
end
Gem::Package::TarWriter.new(File.open(tmp_file, 'w+')) do |tar|
data_encrypt = encrypt(YAML::dump(data))
data_encrypt = encrypt(data.to_yaml)
tar.add_file_simple('wallet/meta.gpg', 0400, data_encrypt.length) do |io|
io.write(data_encrypt)
end
config = @config.to_yaml
config = encrypt(@config.to_yaml)
tar.add_file_simple('wallet/config.gpg', 0400, config.length) do |io|
io.write(config)
end