Merged from:

1722 | danapple0 | 2010-05-22 12:34:16 -0500 (Sat, 22 May 2010) | 3 lines
Changed paths:
   M /k9mail/trunk/src/com/fsck/k9/mail/store/ImapStore.java

Make sure prefix is fetched before any call to getCombinedPrefix.
This commit is contained in:
Daniel Applebaum 2010-05-22 17:44:54 +00:00
parent a3238417e7
commit 7a0eab967e
1 changed files with 30 additions and 2 deletions

View File

@ -454,11 +454,39 @@ public class ImapStore extends Store
this.mName = name;
}
public String getPrefixedName()
public String getPrefixedName() throws MessagingException
{
String prefixedName = "";
if (!K9.INBOX.equalsIgnoreCase(mName))
{
ImapConnection connection = null;
synchronized (this)
{
if (mConnection == null)
{
connection = getConnection();
}
else
{
connection = mConnection;
}
}
try
{
connection.open();
}
catch (IOException ioe)
{
throw new MessagingException("Unable to get IMAP prefix", ioe);
}
finally
{
if (mConnection == null)
{
releaseConnection(connection);
}
}
prefixedName = getCombinedPrefix();
}
@ -1764,7 +1792,7 @@ public class ImapStore extends Store
{
if (o instanceof ImapFolder)
{
return ((ImapFolder)o).getPrefixedName().equals(getPrefixedName());
return ((ImapFolder)o).getName().equalsIgnoreCase(getName());
}
return super.equals(o);
}