- protected void syncNode(Node sourceNode, Session targetSession)
- throws RepositoryException, SAXException {
+ protected void syncNode(Node sourceNode, Session targetSession) throws RepositoryException, SAXException {
+ if (filesOnly) {
+ Node targetNode;
+ if (targetSession.itemExists(sourceNode.getPath()))
+ targetNode = targetSession.getNode(sourceNode.getPath());
+ else
+ targetNode = JcrUtils.mkdirs(targetSession, sourceNode.getPath(), NodeType.NT_FOLDER);
+ JcrUtils.copyFiles(sourceNode, targetNode, true, monitor, true);
+ return;
+ }