stefanseifert commented on code in PR #159:
URL:
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/159#discussion_r1116832196
##########
src/main/java/org/apache/sling/feature/cpconverter/index/IndexDefinitionsJsonWriter.java:
##########
@@ -145,7 +147,7 @@ private void write(JsonGenerator json, DocViewNode2 index,
String parentPath) th
json.writeStartObject(JcrConstants.JCR_CONTENT);
String blobAsString = new String(binary.get(),
StandardCharsets.UTF_8);
write(json, JcrConstants.JCR_PRIMARYTYPE,
Collections.singletonList(JcrConstants.NT_RESOURCE), s ->
Json.createValue("nam:" + s ));
- write(json,
JcrConstants.JCR_MIMETYPE,Collections.singletonList(Files.probeContentType(Paths.get(nodePath))),
Json::createValue );
+ write(json,
JcrConstants.JCR_MIMETYPE,Collections.singletonList(Files.probeContentType(Paths.get(FilenameUtils.getName(nodePath)))),
Json::createValue );
Review Comment:
i've seen the nodePath is constructed a few lines above, using directly
nodeName instead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]