lib/imap/backup/configuration/account.rb in imap-backup-1.0.14 vs lib/imap/backup/configuration/account.rb in imap-backup-1.0.15
- old
+ new
@@ -56,28 +56,31 @@
else
account[:username] = username
if account[:server].nil? or account[:server] == ''
account[:server] = default_server(username)
end
+ account[:modified] = true
end
end
end
def modify_password(menu)
menu.choice('modify password') do
password = Configuration::Asker.password
if ! password.nil?
account[:password] = password
+ account[:modified] = true
end
end
end
def modify_server(menu)
menu.choice('modify server') do
server = highline.ask('server: ')
if ! server.nil?
account[:server] = server
+ account[:modified] = true
end
end
end
def modify_backup_path(menu)
@@ -91,11 +94,13 @@
false
else
true
end
end
+ existing = account[:local_path].clone
account[:local_path] = Configuration::Asker.backup_path(account[:local_path], validator)
+ account[:modified] = true if existing != account[:local_path]
end
end
def choose_folders(menu)
menu.choice('choose backup folders') do
@@ -112,10 +117,10 @@
end
def delete_account(menu)
menu.choice('delete') do
if highline.agree("Are you sure? (y/n) ")
- store.accounts.reject! { |a| a[:username] == account[:username] }
+ account[:delete] = true
throw :done
end
end
end