james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1229606 - /james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java
Date Tue, 10 Jan 2012 15:48:32 GMT
Author: eric
Date: Tue Jan 10 15:48:32 2012
New Revision: 1229606

URL: http://svn.apache.org/viewvc?rev=1229606&view=rev
Log:
Don't throw execption if uidListFile or validityFile not present - This can occur when the
mailbox is not yet consulted (MAILBOX-153)

Modified:
    james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java

Modified: james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java?rev=1229606&r1=1229605&r2=1229606&view=diff
==============================================================================
--- james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java
(original)
+++ james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java
Tue Jan 10 15:48:32 2012
@@ -76,17 +76,16 @@ public class MaildirMailboxMapper extend
                     FileUtils.deleteDirectory(new File(folder, MaildirFolder.NEW));
                     FileUtils.deleteDirectory(new File(folder, MaildirFolder.TMP));
                     File uidListFile = new File(folder, MaildirFolder.UIDLIST_FILE);
+                    uidListFile.delete();
                     File validityFile = new File(folder, MaildirFolder.VALIDITY_FILE);
-                    if (!uidListFile.delete())
-                        throw new IOException("Could not delete file " + uidListFile);
-                    if (!validityFile.delete())
-                        throw new IOException("Could not delete file " + validityFile);
+                    validityFile.delete();
                 }
                 else {
                     // We simply delete all the folder for non INBOX mailboxes.
                     FileUtils.deleteDirectory(folder);
                 }
             } catch (IOException e) {
+                e.printStackTrace();
                 throw new MailboxException("Unable to delete Mailbox " + mailbox, e);
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message