Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Use . as the default hierarchy delimiter when the server doesn't spec…
Browse files Browse the repository at this point in the history
…ify a delimiter (allows poor-man's pseudo-hierarchy on non-hierarchical servers).
  • Loading branch information
rgrove committed Jan 21, 2010
1 parent a40a7bb commit 37b22f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/larch/imap.rb
Expand Up @@ -99,7 +99,7 @@ def connect

# Gets the server's mailbox hierarchy delimiter.
def delim
@delim ||= safely { @conn.list('', '')[0].delim }
@delim ||= safely { @conn.list('', '')[0].delim || '.'}
end

# Closes the IMAP connection if one is currently open.
Expand Down Expand Up @@ -362,7 +362,7 @@ def update_mailboxes
name = Net::IMAP.decode_utf7(mb.name)
name = 'INBOX' if name.downcase == 'inbox'

@mailboxes[name] ||= Mailbox.new(self, name, mb.delim,
@mailboxes[name] ||= Mailbox.new(self, name, mb.delim || '.',
subscribed.any?{|s| s.name == mb.name}, mb.attr)
end

Expand Down

0 comments on commit 37b22f9

Please sign in to comment.