When using document name containing slash, the CoreSession breaks with different behaviour. In most cases, the CoreSession tries to move the document in the corresponding parent which does not exists:
If the expected name is "one/two/three", the CoreSession tries to put the document in parentPath/one/two with name three.
CoreSession.createDocumentModel("/", "test/toast", "Document") => The parent /test does not exists !
We should eitheir escape the name by using the PathSegmentService.
Or - at least - throw the same exception in:
- org.nuxeo.ecm.core.api.CoreSession.createDocumentModel(String, String, String)
- org.nuxeo.ecm.core.api.CoreSession.importDocuments(List<DocumentModel>)
- org.nuxeo.ecm.core.api.CoreSession.copy(DocumentRef, DocumentRef, String)
- org.nuxeo.ecm.core.api.CoreSession.move(DocumentRef, DocumentRef, String)