From: David ‘Bombe’ Roden Date: Mon, 24 Jan 2011 19:19:30 +0000 (+0100) Subject: Download the edition if it’s newer than the current known latest edition. X-Git-Tag: 0.4.2^2~6 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e7502283efff950f985139db4031391d5e22af5f;p=Sone.git Download the edition if it’s newer than the current known latest edition. --- diff --git a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java index 52c2857..3ccda5b 100644 --- a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java +++ b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java @@ -153,8 +153,8 @@ public class FreenetInterface { @SuppressWarnings("synthetic-access") public void onFoundEdition(long edition, USK key, ObjectContainer objectContainer, ClientContext clientContext, boolean metadata, short codec, byte[] data, boolean newKnownGood, boolean newSlotToo) { logger.log(Level.FINE, "Found USK update for Sone “%s” at %s, new known good: %s, new slot too: %s.", new Object[] { sone, key, newKnownGood, newSlotToo }); - if (newKnownGood) { - sone.setLatestEdition(key.suggestedEdition); + if (edition > sone.getLatestEdition()) { + sone.setLatestEdition(edition); new Thread(new Runnable() { @Override