[hibernate-commits] Hibernate SVN: r11615 - branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Mon Jun 4 08:51:58 EDT 2007
Author: max.andersen at jboss.com
Date: 2007-06-04 08:51:57 -0400 (Mon, 04 Jun 2007)
New Revision: 11615
Modified:
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/TemplateHelper.java
Log:
work around linux File mkdirs() issue.
Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/TemplateHelper.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/TemplateHelper.java 2007-06-04 12:49:46 UTC (rev 11614)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/TemplateHelper.java 2007-06-04 12:51:57 UTC (rev 11615)
@@ -171,6 +171,11 @@
} // else make the directory and any non-existent parent directories
else if ( !dir.exists() ) {
if ( !dir.mkdirs() ) {
+ if(dir.getName().equals(".")) { // Workaround that Linux/JVM apparently can't handle mkdirs of File's with current dir references.
+ if(dir.getParentFile().mkdirs()) {
+ return;
+ }
+ }
throw new ExporterException( "unable to create directory: " + dir.getAbsolutePath() );
}
}
More information about the hibernate-commits
mailing list