Fixed nil access.

This commit is contained in:
Martin Edenhofer 2013-01-08 22:25:21 +01:00
parent edb14cdeb6
commit f9b6e383cf

View file

@ -24,7 +24,7 @@ class Channel::IMAP < Channel::EmailParser
end
imap.login( channel[:options][:user], channel[:options][:password] )
end
if channel[:options][:folder].empty?
if !channel[:options][:folder] || channel[:options][:folder].empty?
imap.select('INBOX')
else
imap.select( channel[:options][:folder] )