[jboss-cvs] JBossAS SVN: r97332 - projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 2 17:58:09 EST 2009


Author: jesper.pedersen
Date: 2009-12-02 17:58:08 -0500 (Wed, 02 Dec 2009)
New Revision: 97332

Modified:
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/FileUtil.java
Log:
Make sure that parent directories are present

Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/FileUtil.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/FileUtil.java	2009-12-02 22:33:39 UTC (rev 97331)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/FileUtil.java	2009-12-02 22:58:08 UTC (rev 97332)
@@ -199,6 +199,13 @@
          {
             InputStream in = null;
             OutputStream out = null;
+            
+            // Make sure that the directory is _really_ there
+            if (copy.getParentFile() != null && !copy.getParentFile().exists())
+            {
+               if (!copy.getParentFile().mkdirs())
+                  throw new IOException("Could not create " + copy.getParentFile());
+            }
 
             try
             {




More information about the jboss-cvs-commits mailing list