diff --git a/lib/email/provider.rb b/lib/email/provider.rb index c3374e20..8bfcffc6 100644 --- a/lib/email/provider.rb +++ b/lib/email/provider.rb @@ -37,15 +37,4 @@ def host 'mail.messagingengine.com' end end - - def root - case provider - when /@gmail\.com/ - '/' - when /@fastmail\.fm/ - 'INBOX' - else - '/' - end - end end diff --git a/lib/imap/backup/account/connection.rb b/lib/imap/backup/account/connection.rb index fac74a1e..3eb9d31e 100644 --- a/lib/imap/backup/account/connection.rb +++ b/lib/imap/backup/account/connection.rb @@ -20,10 +20,9 @@ def initialize(options) def folders return @folders if @folders - root = provider_root - @folders = imap.list(root, '*') + @folders = imap.list('', '*') if @folders.nil? - Imap::Backup.logger.warn "Unable to get folder list for account #{username}, (root '#{root}'" + Imap::Backup.logger.warn "Unable to get folder list for account #{username}" end @folders end @@ -105,9 +104,5 @@ def server def provider_options provider.options.merge(connection_options) end - - def provider_root - provider.root - end end end diff --git a/spec/unit/email/provider_spec.rb b/spec/unit/email/provider_spec.rb index ab574156..5a0f24bc 100644 --- a/spec/unit/email/provider_spec.rb +++ b/spec/unit/email/provider_spec.rb @@ -31,10 +31,4 @@ expect(subject.host).to eq('imap.gmail.com') end end - - describe '#root' do - it 'returns root' do - expect(subject.root).to eq('/') - end - end end