Skip to content

Commit

Permalink
fixed bug where packed nodes weren't getting their correct content type
Browse files Browse the repository at this point in the history
  • Loading branch information
sfultongv committed Apr 16, 2012
1 parent 690635b commit 0780fc2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void importR (Node node, PsiDirectory directory) throws RepositoryExcept

// set root jcr node name by filename, rather than element name (since it's always jcr:root)
String name = PsiUtils.unmungeNamespace(psiFile.getName().split("\\.")[0]);
final Node childNode = node.addNode(name);
final Node childNode = node.addNode(name, rootNode.getType());
setProperties(childNode, rootNode);

// start recursion
Expand Down Expand Up @@ -148,7 +148,7 @@ private void unpackRecursively (Element element, Node node) throws IOException,
for (Object o : element.getChildren()) {
Element childElement = (Element) o;
VNode vNode = VNode.makeVNode(childElement);
Node childNode = node.addNode(vNode.getName());
Node childNode = node.addNode(vNode.getName(), vNode.getType());
setProperties(childNode, vNode);

unpackRecursively(childElement, childNode);
Expand Down

0 comments on commit 0780fc2

Please sign in to comment.