From f9b6e383cf0a42e4f22b3a7b54bb54e5254cdcd7 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 8 Jan 2013 22:25:21 +0100 Subject: [PATCH] Fixed nil access. --- app/models/channel/imap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/channel/imap.rb b/app/models/channel/imap.rb index 80d13e1b6..e66fe7856 100644 --- a/app/models/channel/imap.rb +++ b/app/models/channel/imap.rb @@ -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] )