mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-20 01:50:04 +00:00
replace File.exists? by File.exist?
This commit is contained in:
parent
7a831555f4
commit
043e378eab
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ class MPW
|
|||
|
||||
data = nil
|
||||
|
||||
return unless File.exists?(@wallet_file)
|
||||
return unless File.exist?(@wallet_file)
|
||||
|
||||
Gem::Package::TarReader.new(File.open(@wallet_file)) do |tar|
|
||||
tar.each do |f|
|
||||
|
@ -193,7 +193,7 @@ class MPW
|
|||
# Add a public key
|
||||
# args: key -> new public key file or name
|
||||
def add_key(key)
|
||||
if File.exists?(key)
|
||||
if File.exist?(key)
|
||||
data = File.open(key).read
|
||||
key_import = GPGME::Key.import(data, armor: true)
|
||||
key = GPGME::Key.get(key_import.imports[0].fpr).uids[0].email
|
||||
|
|
Loading…
Add table
Reference in a new issue