[jboss-cvs] JBossAS SVN: r59611 - trunk/system/src/main/org/jboss/system/server/profileservice/repository.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 12 21:47:26 EST 2007
Author: scott.stark at jboss.org
Date: 2007-01-12 21:47:24 -0500 (Fri, 12 Jan 2007)
New Revision: 59611
Modified:
trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java
Log:
Create the attachments parent as needed.
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java 2007-01-13 02:15:52 UTC (rev 59610)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java 2007-01-13 02:47:24 UTC (rev 59611)
@@ -77,10 +77,11 @@
vfsPath = ctx.getSimpleName();
vfsPath += ".attachments";
File attachmentsStore = new File(attachmentsStoreDir, vfsPath);
- if( attachmentsStoreDir.exists() == false )
+ File attachmentsParent = attachmentsStore.getParentFile();
+ if( attachmentsParent.exists() == false )
{
- if( attachmentsStoreDir.mkdirs() == false )
- throw new IOException("Failed to create attachmentsStoreDir: "+attachmentsStoreDir.getAbsolutePath());
+ if( attachmentsParent.mkdirs() == false )
+ throw new IOException("Failed to create attachmentsParent: "+attachmentsParent.getAbsolutePath());
}
saveAttachments(attachmentsStore, ctx);
More information about the jboss-cvs-commits
mailing list