Skip to content

Commit

Permalink
Fix Enigma dir writer behaving incorrectly after first write when usi…
Browse files Browse the repository at this point in the history
…ng MIO
  • Loading branch information
NebelNidas committed Aug 18, 2024
1 parent 6fd510c commit 3a29b65
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public void write(EntryTree<EntryMapping> mappings, MappingDelta<EntryMapping> d
try {
if (this == ENIGMA_DIRECTORY) { // TODO: Remove once MIO supports deltas
EnigmaMappingsWriter.DIRECTORY.write(mappings, lastUsedMappingIoWriter ? MappingDelta.added(mappings) : delta, path, progressListener, saveParameters, true);
lastUsedMappingIoWriter = false;
} else {
if (this == PROGUARD) {
mappings = MappingOperations.invert(mappings);
Expand All @@ -91,9 +92,9 @@ public void write(EntryTree<EntryMapping> mappings, MappingDelta<EntryMapping> d

tree.accept(MappingWriter.create(path, mappingIoCounterpart), VisitOrder.createByName());
progressListener.step(1, I18n.translate("progress.done"));
lastUsedMappingIoWriter = true;
}

Check failure on line 96 in enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingFormat.java

View workflow job for this annotation

GitHub Actions / build (17-ubuntu)

blank line before }

Check failure on line 96 in enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingFormat.java

View workflow job for this annotation

GitHub Actions / build (21-ubuntu)

blank line before }

lastUsedMappingIoWriter = true;
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Expand Down

0 comments on commit 3a29b65

Please sign in to comment.