Skip to content

Commit

Permalink
Prepend dot(.) if extension doesn't start with a dot.
Browse files Browse the repository at this point in the history
  • Loading branch information
amvanbaren committed Dec 16, 2022
1 parent 448cc34 commit 31aee8a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,10 @@ private Map<String, String> parseContentTypesXml(byte[] content) {
var element = elements.item(i);
var attributes = element.getAttributes();
var extension = attributes.getNamedItem("Extension").getTextContent();
if(!extension.startsWith(".")) {
extension = "." + extension;
}

var contentType = attributes.getNamedItem("ContentType").getTextContent();
contentTypes.put(extension, contentType);
}
Expand Down

0 comments on commit 31aee8a

Please sign in to comment.