Skip to content

Commit

Permalink
fixed import of packed nodes if they were the root node imported
Browse files Browse the repository at this point in the history
  • Loading branch information
sfultongv committed Feb 1, 2013
1 parent e08590e commit c294f38
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ public void run() {
try {
// if this node is a "typed" node, get the VNode version of it
VNode vNode = null;
Element rootElement = null;
PsiFile contentFile = directory.findFile(".content.xml");
if (contentFile != null) {
vNode = VNode.makeVNode(contentFile.getVirtualFile().getInputStream());
rootElement = JDOMUtil.loadDocument(contentFile.getVirtualFile().getInputStream()).getRootElement();
vNode = VNode.makeVNode(rootElement);
}

// get/create rootNode
Expand All @@ -76,6 +78,7 @@ public void run() {
// set root node properties, if it has them
if (vNode != null) {
setProperties(rootNode, vNode);
unpackRecursively(rootElement, rootNode);
}

// start import to jcr
Expand Down

0 comments on commit c294f38

Please sign in to comment.