You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by sg...@apache.org on 2009/02/05 18:13:02 UTC
svn commit: r741184 -
/commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java
Author: sgoeschl
Date: Thu Feb 5 17:13:01 2009
New Revision: 741184
URL: http://svn.apache.org/viewvc?rev=741184&view=rev
Log:
When writing a MimeMessage to a file create the required directory if its not already there.
Modified:
commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java
Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java?rev=741184&r1=741183&r2=741184&view=diff
==============================================================================
--- commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java (original)
+++ commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java Thu Feb 5 17:13:01 2009
@@ -249,6 +249,11 @@
throw new IllegalArgumentException( "resulFile is null");
}
+ if(resultFile.getParentFile() != null)
+ {
+ resultFile.getParentFile().mkdirs();
+ }
+
try
{
fos = new FileOutputStream(resultFile);