Creating atts directory when needed.

This commit is contained in:
Winston Li 2014-11-19 21:31:01 +00:00
parent 0442cd7e0b
commit b51b37f71f

View file

@ -91,6 +91,7 @@ public class WLDirectoryNode implements PersistentStoreSource, PersistentStoreUp
public WLDirectoryNode createFromRawDirectoryContents(RawDirectoryContents rawDirectoryContents, File attachmentDirectory) throws IOException, FailedConnectionException {
Map<String, FileNode> candidateFileNodeTable = new HashMap<String, FileNode>();
File projectAttDirectory = new File(attachmentDirectory, projectName);
projectAttDirectory.mkdirs();
WLFileStore.deleteInDirectory(projectAttDirectory);
for (Entry<String, byte[]> fileContents : rawDirectoryContents.getFileContentsTable().entrySet()) {
BlobNode blobNode = new BlobNode(new RepositoryFile(fileContents), fileNodeTable, projectAttDirectory);