1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-10-27 02:33:19 +00:00

fix bug: no save temporary the password

This commit is contained in:
nishiki 2013-08-03 00:06:29 +02:00
parent 9611f8b23e
commit 4228d4839e

7
MPW.rb
View file

@ -103,14 +103,15 @@ class MPW
begin
if passwd.nil? || passwd.empty?
passwd = IO.read(@file_pwd)
end
rescue
if !passwd.nil? && !passwd.empty?
elsif !passwd.nil? && !passwd.empty?
file_pwd = File.new(@file_pwd, 'w')
File.chmod(0600, @file_pwd)
file_pwd << passwd
file_pwd.close
end
rescue
return false
end
begin