Skip to content

Commit

Permalink
fix #386
Browse files Browse the repository at this point in the history
  • Loading branch information
João Gomes committed May 25, 2022
1 parent 45e1cba commit 76a443b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ public DescriptiveMetadata(MetadataOption creatorOption, Path path, String metad
this.metadataVersion = metadataVersion;
this.templateType = templateType;
if (templateType != null) {
this.id = templateType + Constants.MISC_XML_EXTENSION;
if (templateType.endsWith(Constants.MISC_XML_EXTENSION)) {
this.id = templateType;
} else {
this.id = templateType + Constants.MISC_XML_EXTENSION;
}
} else if (path != null) {
this.id = path.getFileName().toString();
}
Expand Down

0 comments on commit 76a443b

Please sign in to comment.