From 45e7afc60e1f4274c47ab8a8eb6e6a85806a17f5 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 20 Jan 2012 19:50:07 +0100 Subject: [PATCH] Make sure an IOException is always passed through as MessagingException This is important for the code handling pending actions in MessagingController. If a non-permantent MessagingException is encountered, the pending action is retried later. Fixes issue 3696 --- src/com/fsck/k9/mail/store/ImapStore.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 11981e5ec..53daaf555 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -892,7 +892,8 @@ public class ImapStore extends Store { return true; } catch (IOException ioe) { throw ioExceptionHandler(mConnection, ioe); - } catch (MessagingException me) { + } catch (ImapException ie) { + // We got a response, but it was not "OK" return false; } } @@ -920,7 +921,8 @@ public class ImapStore extends Store { encodeString(encodeFolderName(getPrefixedName())))); mExists = true; return true; - } catch (MessagingException me) { + } catch (ImapException ie) { + // We got a response, but it was not "OK" return false; } catch (IOException ioe) { throw ioExceptionHandler(connection, ioe); @@ -950,7 +952,8 @@ public class ImapStore extends Store { connection.executeSimpleCommand(String.format("CREATE %s", encodeString(encodeFolderName(getPrefixedName())))); return true; - } catch (MessagingException me) { + } catch (ImapException ie) { + // We got a response, but it was not "OK" return false; } catch (IOException ioe) { throw ioExceptionHandler(mConnection, ioe);