mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-21 10:20:05 +00:00
fix write config
This commit is contained in:
parent
b85d5109a1
commit
9b853a371a
1 changed files with 2 additions and 2 deletions
|
@ -101,12 +101,12 @@ class MPW
|
||||||
end
|
end
|
||||||
|
|
||||||
Gem::Package::TarWriter.new(File.open(tmp_file, 'w+')) do |tar|
|
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|
|
tar.add_file_simple('wallet/meta.gpg', 0400, data_encrypt.length) do |io|
|
||||||
io.write(data_encrypt)
|
io.write(data_encrypt)
|
||||||
end
|
end
|
||||||
|
|
||||||
config = @config.to_yaml
|
config = encrypt(@config.to_yaml)
|
||||||
tar.add_file_simple('wallet/config.gpg', 0400, config.length) do |io|
|
tar.add_file_simple('wallet/config.gpg', 0400, config.length) do |io|
|
||||||
io.write(config)
|
io.write(config)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue