Skip to content

Commit

Permalink
Fixes for IrpDatabase version management.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengtmartensson committed Nov 11, 2024
1 parent 57698c2 commit 27f61cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/harctoolbox/irp/IrpDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ public IrpDatabase(Document doc) throws IrpParseException {

public IrpDatabase(Element protocolsElement) throws IrpParseException {
this();
version.append(protocolsElement.getAttribute(VERSION_NAME));
patchProtocols(protocolsElement);
expand();
rebuildAliases();
Expand Down Expand Up @@ -855,6 +856,10 @@ private void appendToVersion(String version) {
if (version.isEmpty())
return;

// If version already ends with the patch version, do not apply again
if (this.version.toString().endsWith("+" + version))
return;

if (this.version.length() > 0)
this.version.append("+");
this.version.append(version);
Expand Down

0 comments on commit 27f61cf

Please sign in to comment.