- if (filesOnly) {
- JcrUtils.copyFiles(sourceSession.getRootNode(), targetSession.getRootNode(), true, monitor);
- } else {
- for (NodeIterator it = sourceSession.getRootNode().getNodes(); it.hasNext();) {
- Node node = it.nextNode();
- if (node.getName().equals("jcr:system"))
- continue;
- syncNode(node, targetSession);
- }
+ for (NodeIterator it = sourceSession.getRootNode().getNodes(); it.hasNext();) {
+ Node node = it.nextNode();
+ if (node.getName().contains(":"))
+ continue;
+ if (node.getName().equals("download"))
+ continue;
+ if (!node.isNodeType(NodeType.NT_HIERARCHY_NODE))
+ continue;
+ syncNode(node, targetSession);